#36225: USERNAME_FIELD must be unique in order to use createsuperuser command
--------------------------------------+------------------------------------
     Reporter:  Jonas Dittrich        |                    Owner:  (none)
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.auth          |                  Version:  5.1
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

 * component:  Uncategorized => contrib.auth
 * stage:  Unreviewed => Accepted
 * summary:
     User profile models with nullable emails cannot use createsuperuser
     command
     => USERNAME_FIELD must be unique in order to use createsuperuser
     command
 * type:  Uncategorized => Cleanup/optimization

Comment:

 Based off the forum thread, the confusion here I see is from the
 
[https://docs.djangoproject.com/en/5.1/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
 USERNAME_FIELD docs] saying:

 > The field must be unique (e.g. have unique=True set in its definition),
 unless you use a custom authentication backend that can support non-unique
 usernames.

 I think we could remove the "unless you use a custom authentication
 backend that can support non-unique usernames." because it implies we
 support this use case.
 Accepting for Documentation tweaks
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36225#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 django-updates+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070195845c1d9c-bc2e92ce-5d5a-453c-8c07-d31e8f5fc430-000000%40eu-central-1.amazonses.com.

Reply via email to