#34542: Required fields allowed to be blank are not accepted non-interactively
using createsuperuser
-------------------------------------+-------------------------------------
     Reporter:  Lantizia             |                    Owner:  Anvansh
                                     |  Singh
         Type:  Bug                  |                   Status:  assigned
    Component:  contrib.auth         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:  auth                 |             Triage Stage:  Accepted
  createsuperuser superuser email    |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mohit Singh Sinsniwal):

 Replying to [comment:7 Natalia Bidart]:
 > Thanks Lantizia, you have a valid point, we could make the
 noninteractively process allow for the empty string for email, to match
 the behavior of the interactive and web experience, but only when either
 the `--email` or env var should be passed as such though.
 >
 > Would you like to prepare a patch?
 I want to work on this. However, I would like to understand what we want
 to solve. If we give an email and username with --noinput, it does not
 require the password.
 {{{
 python3.11 manage.py createsuperuser --email "[email protected]"  --user mohitd
 --noinput
 }}}

 And if we dont want to write the email, it will require the password.
 {{{
 python3.11 manage.py createsuperuser --email ""  --user mohite
 }}}

 Do we want to create --noinput with no email? Because that means creating
 a superuser without giving an email and password

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34542#comment:9>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701883aab7ed6-fa523456-e3b2-4abc-92b6-ae31554465f5-000000%40eu-central-1.amazonses.com.

Reply via email to