我从 djangoproject.com 浏览了第一个 django 教程,在第 2 部分的开头,当我运行 "python manage.py createsuperuser"
时创建 super 用户,我收到以下消息:
Superuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.
当我在运行 syncdb
后继续创建 super 用户时,我得到了相同的消息。
我正在为 Windows 7、Django 1.7.1 和 Python 2.7.8 开发 Eclipse。
最佳答案
当使用 Git Bash 并更正上述错误消息时,尝试附加 winpty
例如:
$ winpty python manage.py createsuperuser
Username (leave blank to use '...'):
关于python - 由于不在 TTY 中工作,无法在 Django 中创建 super 用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26980003/