使用Django 的认证系统实现用户信息验证
在前面使用migrate 命令进行数据迁移时候,生成了auth_user表 ,该表中存放了用户信息可以用来登录Django自带的Admin 管理后台。
创建Admin 后台管理账号
python manage.py createuperuser
E:\data\python\djaongo_prj\guest>python manage.py createuperuser
Unknown command: 'createuperuser'. Did you mean createsuperuser?
Type 'manage.py help' for usage.
E:\data\python\djaongo_prj\guest>python manage.py createsuperuser
Username (leave blank to use 'administrator'): admin
Email address: admin@mail.com
Password:
Password (again):
Superuser created successfully.
用户名:admin 密码: admin123456