windows下Django無法建立superuser的問題
最開始是使用的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(有可能會打不開)