简体   繁体   中英

unable to create superuser in django

Every time I try to create a database this happens

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":

Hah, I bet it's to do with the character set. What do you get if you run this?

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

If your system encoding is different from the one that Python is using then "yes" in python may not equal "yes" in your terminal. :-O

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM