Django 设置sqlite3管理财用户密码。
在未设置时登陆报错信息如下:
Please enter the correct username and password for a staff account. Note tha。。。。
进行设置如下:
E:\JavaCode\PythonWeb\MyWeb>python manage.py flush
You have requested a flush of the database.
This will IRREVERSIBLY DESTROY all data currently in the ‘E:\JavaCode\PythonWe
b\MyWeb\db.sqlite3’ database,
and return each table to an empty state.
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
E:\JavaCode\PythonWeb\MyWeb>python manage.py createsuperuser
Username (leave blank to use ‘administrator’): admin
Email address: [email protected]
Password:
Password (again):
Superuser created successfully.