在访问 http://127.0.0.1:8000/admin/是报错Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive
原因:没有创建用户
解决办法
# python manage.py createsuperuser
#输入Username (leave blank to use 'root'): admin
#输入用户名Email address: admin@runoob.com
#输入邮箱Password:
#输入新建的用户密码Password (again):
#再次输入
Superuser created successfully. #出现这个,表明创建成功
密码不能喝用户名和邮箱相似,8位以上
网友评论