错误 Please enter the correct username and password for a staff account. Note that both fields may be

在django使用admin管理员的时候出现如下错误

错误:

Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive.

错误 Please enter the correct username and password for a staff account. Note that both fields may be

原因:

没有创建这个用户


解决办法:

# python manage.py createsuperuser            #输入
Username (leave blank to use 'root'): admin            #输入用户名
Email address: [email protected].com            #输入邮箱
Password:            #输入新建的用户密码
Password (again):            #再次输入
Superuser created successfully.            #出现这个,表明创建成功
[[email protected] HelloWorld]#