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

django 入门问题

  •  
  •   whyiyou 2014-12-15 16:02:12 +08:00 5541 次点击
    这是一个创建于 3954 天前的主题,其中的信息能已经有所发展或是发生改变。
    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     Solana     3129 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 34ms UTC 00:35 PVG 08:35 LAX 17:35 JFK 20:35
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86