#24910: createsuperuser in interactive mode assumes USERNAME_FIELD is unique
------------------------------+--------------------------------------
     Reporter:  carljm        |                    Owner:  nobody
         Type:  Bug           |                   Status:  new
    Component:  contrib.auth  |                  Version:  1.8
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------

Comment (by danielward):

 According to documentation on customising authentication, the
 `USERNAME_FIELD` ''must'' point to a field which holds unique values.
 Furthermore, the check framework will raise `auth.W004` in the event of
 the field being non-unique. I'd suggest, therefore that the
 `createsuperuser` management command correctly works within the realm of
 this restriction regardless of any custom authentication backend.

 Please see supportive documentation below:

 
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
 https://docs.djangoproject.com/en/dev/ref/checks/#auth

--
Ticket URL: <https://code.djangoproject.com/ticket/24910#comment:1>
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.fdcb46ab78feeb09020fdab9b74f0685%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to