Opened 15 years ago
Closed 15 years ago
#13158 closed (fixed)
Documentation still says to use ForeignKey with unique=True to add a UserProfile
Reported by: | Harro | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation says to extend the user model you should add a profile model with a foreignkey with unique=True to the user.
Is there a reason for doing this instead of a OneToOne field?
The OneToOne field has the advantage that you can get the profile for the user directly.
Attachments (1)
Change History (5)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
by , 15 years ago
Attachment: | ticket13158.diff added |
---|
comment:3 by , 15 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
The disadvantage of this approach is that you only have one profile per user. Nonetheless, the patch is fine and it's been approved.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
There's no specific reason. Patch welcome.