#24429: Revise docs regarding non-int primary key on custom user models
--------------------------------------+------------------------------------
Reporter: shadfc | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8beta1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by claudep):
* has_patch: 0 => 1
Comment:
The fact that we have tests for an UUIDUser (see #24161) should prove that
the integer PK is no longer a requirement.
I'd suggest:
{{{
#!diff
diff --git a/docs/topics/auth/customizing.txt
b/docs/topics/auth/customizing.txt
index 3833328..9c41e78 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -469,13 +469,11 @@ Specifying a custom User model
Django expects your custom User model to meet some minimum requirements.
-1. Your model must have an integer primary key.
-
-2. Your model must have a single unique field that can be used for
+1. 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.
-3. Your model must provide a way to address the user in a "short" and
+2. 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
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24429#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.0cba970e52e41d645712bb1640a124d8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.