summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2013-02-16 10:21:05 +0800
committerRussell Keith-Magee <russell@keith-magee.com>2013-02-16 10:21:45 +0800
commit461d6e22957770449cd99367358c5e419bc3a86d (patch)
tree75cf131e164eb54e37d36d3eefa50fce4b2e7cbe
parent5a803ce10ef0c1b3777fb781d6feba72610c4265 (diff)
[1.5.x] Refs #14881 -- Document that User models need to have an integer primary key.
Thanks to Kaloian Minkov for the reminder about this undocumented requirement. (cherry picked from commit 91c26eadc9b4efa5399ec0f6c84b56a3f8eb84f4)
-rw-r--r--docs/topics/auth/customizing.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index 9c36bf26e5..fcda9c302e 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -460,11 +460,13 @@ Specifying a custom User model
Django expects your custom User model to meet some minimum requirements.
-1. Your model must have a single unique field that can be used for
+1. Your model must have an integer primary key.
+
+2. Your model must have a single unique field that can be used for
identification purposes. This can be a username, an email address,
or any other unique attribute.
-2. Your model must provide a way to address the user in a "short" and
+3. Your model must provide a way to address the user in a "short" and
"long" form. The most common interpretation of this would be to use
the user's given name as the "short" identifier, and the user's full
name as the "long" identifier. However, there are no constraints on