- Django提供admin后臺,便于統(tǒng)一管理用戶、權限和權限組,超級用戶初始化方法
- 初始化命令行:
python3 manage.py createsuperuser
- 根據(jù)提示設置用戶名、郵箱和密碼:
用戶名 (leave blank to use 'admin'): ntopic
電子郵件地址: ntopic@163.com
Password:
Password (again):
密碼長度太短。密碼必須包含至少 8 個字符。
這個密碼太常見了。
這個密碼全部是數(shù)字的。
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
- 至此,就可用登錄到后臺了:http://127.0.0.1:8000/admin