Solution for Django to forget the Administrator account and password: django account
After looking at the Django tutorial to build a website, I forgot my first account and password. As a result, you cannot log on to the Management page and cannot proceed.
:
I can't find many methods on the Internet. I finally use the method of creating a superuser, but the account I set previously does not seem to work.
Steps:
1. Create a username and run the following command:
Python manage. py createsuperuser
2. Enter the login name you want to use:
Username (leave blank to use 'admin'): user01
3. Enter email:
Email address:
4. Enter the password twice. The password is not displayed during the input process:
Password:
Password (again ):
When both passwords are the same, the system prompts that the superuser is successfully created.
Superuser created successfully
Next, run the service:
Python manage. py runserver
Open 127.0.0.1: 8000/admin in the browser
Enter the username and password you just created.