由于在TTY中不工作,无法在django中创建超级用户 [英] Unable to create superuser in django due to not working in TTY

查看:851
本文介绍了由于在TTY中不工作,无法在django中创建超级用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从djangoproject.com和第2部分的第一个django教程开始,当我运行python manage.py createduperuser时,它正在创建超级用户 I得到以下消息:

 超级用户创建由于未在TTY中运行而跳过。您可以在项目中运行`manage.py creationuperuser`来手动创建一个。 

在运行 syncdb之后继续创建超级用户时,我收到相同的消息



我正在使用Eclipse for Windows 7和Django 1.7.1以及Python 2.7.8。

解决方案

如果你在virtualenv, cd 到你的virtualenv并激活它。然后尝试以下步骤:

  python manage.py syncdb --noinput 
python manage.py migrate
python manage.py createduperuser


I go through first django tutorial from djangoproject.com and at the very beginning of part 2, which is creating superuser when I run "python manage.py createsuperuser" I get the following message back:

Superuser creation skipped due to not running in a TTY. You can run `manage.py createsuperuser` in your project to create one manually.    

I get the same message when I go on to create superuser after running syncdb.

I am working on Eclipse for Windows 7, and Django 1.7.1 together with Python 2.7.8.

解决方案

if you are in virtualenv, cd into your virtualenv and activate it. then try these steps:

python manage.py syncdb --noinput
python manage.py migrate
python manage.py createsuperuser

这篇关于由于在TTY中不工作,无法在django中创建超级用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆