django 入门问题

2014-12-15 16:02:12 +08:00
 whyiyou
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.


我和他遇到同样的问题,求解答!
5028 次点击
所在节点    Django
11 条回复
whyiyou
2014-12-15 16:08:15 +08:00
我用的pydev
hahastudio
2014-12-15 16:11:33 +08:00
没在 windows 下面写过
它说因为你没在 Text terminals 里面运行,所以建立 superuser 的步骤就被跳过了
我只知道用 Linux 的时候,做教程什么问题都没有
也许你可以试试 cygwin?
hahastudio
2014-12-15 16:13:20 +08:00
Could we try running 'python manage.py createsuperuser' from the windows command line instead of the eclipse custom command tool? – Kevin Cherepski Nov 17 at 21:00

Wow, I feel like an idiot for not trying this myself. Worked like a charm, thanks Kevin. – PJM Nov 17 at 22:50

https://stackoverflow.com/questions/26980003/unable-to-create-superuser-in-django-due-to-not-working-in-tty
whyiyou
2014-12-15 16:58:03 +08:00
@hahastudio ,啊,我刚刚没注意到这个对话……
谢谢!
lgh
2014-12-15 20:39:25 +08:00
我猜是因为你直接在 Eclipse 里跑的时候无法交互,而创建超级用户是要输入密码的。
redguy6
2014-12-15 23:18:34 +08:00
为什么不用linux?
n37r06u3
2014-12-15 23:20:51 +08:00
我是来打广告的 http://pythoncave.com .... 还在更新中
xiaowangge
2014-12-15 23:51:31 +08:00
Windows 下CMD 运行。

玩Python相关,到最后还是用Mac OS 或者Linux省时间(^_^)
rcmerci
2014-12-16 00:20:01 +08:00
开一个终端,然后 python manage.py createsuperuser
LittleMK
2014-12-16 00:21:25 +08:00
右键管理员打开?
whyiyou
2014-12-17 18:20:57 +08:00
已经解决了··
现在是在别人电脑上做,pydev方便点,至少不用折腾硬盘分区和虚拟机……
不过接触pydev是因为之前的公司都用pydev···

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/154072

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX