Solution for Django to forget the Administrator account and password: django account

Source: Internet
Author: User
Tags django tutorial

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.