繁体   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