windows下Django无法创建superuser的问题

来源:互联网 发布:win10下载不了软件 编辑:程序博客网 时间:2024/05/17 06:55

最开始是使用的Python3.2和Django1.4,创建超级用户失败:

You just installed Django's auth system, which means you don't have any superuse
rs defined.
Would you like to create one now? (yes/no): yes

不管输入什么,都会提示要求输入yes或no。开始以为是编码的问题,改setting.py配置,该操作系统编码、语言等,都没用,然后以为是Django版本对Python3.2兼容性问题,改为Django1.5,还是一样的问题。在网上找了很久,一直没有找到有人有提同类的问题。当时应该是自己搜索条件的问题吧。今天用关键词“windows django yes no”搜索,嘿,终于搜索到了一篇同样问题的帖子。其中提到“Apparently there was a bug in python 3.2 on windows that added an extra character to strings when the built-in input function is used. I switched my default python installation  to python 3.3 and hope Django 1.5 is fully compatible with it”。原来是Python3.2的BUG!重新安装Python3.3,终于解决了这个问题!

原帖地址:https://groups.google.com/forum/?fromgroups=#!topic/django-users/bPVDaTFtBAk(有可能会打不开)