allow USERNAME_FIELD to be a ForeignKey
|Reported by:||cjerdonek||Owned by:||nobody|
|Cc:||bmispelon, chris.jerdonek@…, loic@…||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
This issue is to add support for USERNAME_FIELD being a ForeignKey. Currently, this isn't supported because, for example, the createsuperuser command doesn't support inputting the corresponding foreign key data (also see #21755 for another issue with the createsuperuser command needed for this).
One use case for USERNAME_FIELD being a ForeignKey is if the username is an email address, and you would like to have a separate table for e-mail address related data (e.g. total e-mails sent, last e-mail sent, etc), as well as allow changing the email address on a user account.
Change History (8)
comment:1 Changed 3 months ago by cjerdonek
- Cc chris.jerdonek@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:2 Changed 6 weeks ago by anubhav9042
comment:5 Changed 6 weeks ago by loic84
- Cc loic@… added