whyiyou
V2EX  ›  Django

django 入门问题

  •  
  •   whyiyou · Dec 15, 2014 · 5941 views
    This topic created in 4196 days ago, the information mentioned may be changed or developed.
    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 replies    2014-12-17 18:20:57 +08:00
    whyiyou
        1
    whyiyou  
    OP
       Dec 15, 2014
    我用的pydev
    hahastudio
        2
    hahastudio  
       Dec 15, 2014
    没在 windows 下面写过
    它说因为你没在 Text terminals 里面运行,所以建立 superuser 的步骤就被跳过了
    我只知道用 Linux 的时候,做教程什么问题都没有
    也许你可以试试 cygwin?
    hahastudio
        3
    hahastudio  
       Dec 15, 2014
    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
       Dec 15, 2014
    @hahastudio ,啊,我刚刚没注意到这个对话……
    谢谢!
    lgh
        5
    lgh  
       Dec 15, 2014
    我猜是因为你直接在 Eclipse 里跑的时候无法交互,而创建超级用户是要输入密码的。
    redguy6
        6
    redguy6  
       Dec 15, 2014 via Android
    为什么不用linux?
    n37r06u3
        7
    n37r06u3  
       Dec 15, 2014
    我是来打广告的 http://pythoncave.com .... 还在更新中
    xiaowangge
        8
    xiaowangge  
       Dec 15, 2014 via Android
    Windows 下CMD 运行。

    玩Python相关,到最后还是用Mac OS 或者Linux省时间(^_^)
    rcmerci
        9
    rcmerci  
       Dec 16, 2014
    开一个终端,然后 python manage.py createsuperuser
    LittleMK
        10
    LittleMK  
       Dec 16, 2014 via Android
    右键管理员打开?
    whyiyou
        11
    whyiyou  
    OP
       Dec 17, 2014
    已经解决了··
    现在是在别人电脑上做,pydev方便点,至少不用折腾硬盘分区和虚拟机……
    不过接触pydev是因为之前的公司都用pydev···
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5322 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 63ms · UTC 01:32 · PVG 09:32 · LAX 18:32 · JFK 21:32
    ♥ Do have faith in what you're doing.