#27769: Impossible to call createsuperuser from call_command
-------------------------------------+-------------------------------------
               Reporter:  Kenny      |          Owner:  nobody
  Loveall                            |
                   Type:  Bug        |         Status:  new
              Component:  Core       |        Version:  1.8
  (Management commands)              |
               Severity:  Normal     |       Keywords:  createsuperuser
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 From what I can tell, it is impossible to call the createsuperuser command
 using the call_command function.

 If this is intentional, it should be documented on one of the two
 functions.

 **Steps to Reproduce:**
 run "call_command('createsuperuser', noinput=True, username='test',
 email='[email protected]')" from a non-interactive command (such as calling
 it inside a view).

 **Expected outcome:**
 Superuser is created without a password.

 **Observed outcome:**
 500 error and message "Superuser creation skipped due to not running in a
 TTY. You can run `manage.py createsuperuser` in your project to create one
 manually." logged.

 From what I can tell as well, there's no way to run createsuperuser and
 have it create a user without a password as the documentation states is
 possible ("When run non-interactively, no password will be set").

--
Ticket URL: <https://code.djangoproject.com/ticket/27769>
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/052.23e625a282ae1aa3da1f0a023d25a33c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to