簡體   English   中英

無法在Django中創建超級用戶

[英]unable to create superuser in django

每當我嘗試創建數據庫時,都會發生這種情況

C:\Users\Admin8085\Desktop\src>python manage.py syncdb
Creating tables ...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_groups
Creating table auth_user_user_permissions
Creating table auth_user
Creating table django_content_type
Creating table django_session

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
Please enter either "yes" or "no": yes
Please enter either "yes" or "no": yes
Please enter either "yes" or "no": yes
Please enter either "yes" or "no": 'yes'
Please enter either "yes" or "no": yes
Please enter either "yes" or "no":

哈哈,我敢打賭這與字符集有關。 如果運行此命令,您會得到什么?

python -c "import sys; print(sys.getdefaultencoding())"

如果您的系統編碼與Python使用的編碼不同,則python中的“是”可能與終端中的“是”不相等。 :-O

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM