#24429 closed Cleanup/optimization (fixed)
Revise docs regarding non-int primary key on custom user models
Reported by: | shadfc | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.8beta1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The docs (https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#specifying-a-custom-user-model, point #1) say that a custom user model must have an integer primary key but do not specify why. https://code.djangoproject.com/ticket/24161 dealt with a session issue and has been fixed.
I would like to be able to use a UUID as the pk for a custom user model but this message makes me unsure if I should attempt that. Tim Graham suggested opening a ticket to investigate this issue and either remove that note from the docs or add a better explanation to it.
Change History (7)
comment:1 by , 10 years ago
Component: | Uncategorized → Documentation |
---|
comment:2 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → Cleanup/optimization |
comment:3 by , 10 years ago
Has patch: | set |
---|
comment:4 by , 10 years ago
I thought we might want to do a bit more thorough test/investigating instead of relying only on reports of things that *didn't* work.
comment:7 by , 10 years ago
For posterity, I didn't do any further investigation. Let's see if we get any reports about things that don't work.
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:
docs/topics/auth/customizing.txt
3. Your model must provide a way to address the user in a "short" and