Reputation: 9873
The 'python manage.py createsuperuser' command gives me this error:
Superuser creation skipped due to not running in a TTY. You can run
manage.py createsuperuser
in your project to create one manually.
Looking through the source, namely createsuperuser.py, it catches the NotRunningInTTYException:
except NotRunningInTTYException:
self.stdout.write(
"Superuser creation skipped due to not running in a TTY. "
"You can run `manage.py createsuperuser` in your project "
"to create one manually."
)
Anyone know how I can resolve this error? if it makes any difference, my installation process was a headache... getting 'python manage.py runserver' took me a good day. Maybe I don't have things configured properly... Using Windows.
Upvotes: 2
Views: 5420
Reputation:
You can create super user using:
winpty python manage.py createsuperuser
Upvotes: 0
Reputation: 267
For Windows CMD console you should do this steps (if you use virtual environment):
Upvotes: 1
Reputation: 11916
I believe you tried to run this inside an IDE or some other environment which is not a TTY. Django expects the command to be run from a TTY compatible shell.
Run the command on your Windows command prompt, outside your editor/IDE. It should work.
To know more about TTY:
Upvotes: 4