V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
whyiyou
V2EX  ›  Django

django 入门问题

  •  
  •   whyiyou · 2014-12-15 16:02:12 +08:00 · 5021 次点击
    这是一个创建于 3412 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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.


    我和他遇到同样的问题,求解答!
    11 条回复    2014-12-17 18:20:57 +08:00
    whyiyou
        1
    whyiyou  
    OP
       2014-12-15 16:08:15 +08:00
    我用的pydev
    hahastudio
        2
    hahastudio  
       2014-12-15 16:11:33 +08:00
    没在 windows 下面写过
    它说因为你没在 Text terminals 里面运行,所以建立 superuser 的步骤就被跳过了
    我只知道用 Linux 的时候,做教程什么问题都没有
    也许你可以试试 cygwin?
    hahastudio
        3
    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
        4
    whyiyou  
    OP
       2014-12-15 16:58:03 +08:00
    @hahastudio ,啊,我刚刚没注意到这个对话……
    谢谢!
    lgh
        5
    lgh  
       2014-12-15 20:39:25 +08:00
    我猜是因为你直接在 Eclipse 里跑的时候无法交互,而创建超级用户是要输入密码的。
    redguy6
        6
    redguy6  
       2014-12-15 23:18:34 +08:00 via Android
    为什么不用linux?
    n37r06u3
        7
    n37r06u3  
       2014-12-15 23:20:51 +08:00
    我是来打广告的 http://pythoncave.com .... 还在更新中
    xiaowangge
        8
    xiaowangge  
       2014-12-15 23:51:31 +08:00 via Android
    Windows 下CMD 运行。

    玩Python相关,到最后还是用Mac OS 或者Linux省时间(^_^)
    rcmerci
        9
    rcmerci  
       2014-12-16 00:20:01 +08:00
    开一个终端,然后 python manage.py createsuperuser
    LittleMK
        10
    LittleMK  
       2014-12-16 00:21:25 +08:00 via Android
    右键管理员打开?
    whyiyou
        11
    whyiyou  
    OP
       2014-12-17 18:20:57 +08:00
    已经解决了··
    现在是在别人电脑上做,pydev方便点,至少不用折腾硬盘分区和虚拟机……
    不过接触pydev是因为之前的公司都用pydev···
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1366 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:45 · PVG 07:45 · LAX 16:45 · JFK 19:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.