Django authentication module auth, form component form

django authentication system:

1. User table django auth_user

  1. First we open a django project in a new window, then click,

  

  

  2. In this interface, it is equivalent to using the management command of python manage.py, which can be used as a prompt.

  

 

  

  3. Select the database you want to connect to, and then run the migrate command. Since we did not record operations (ie makemigrations), the generated tables are all tables that come with django. The scissor arrow points to the table that our authentication system operates.

  

  4. Open this table and take a look. Generally, we use username (user name), password (password), is_superuser (whether it is a super user, it is 1, not 0). By default, the fields of this table can be empty. Pass whichever you want to use.

 

5. Then enter createsuperuser in the interface in step 2, create a super user, and enter as required.

6.

  

 

  

  

 

 

 

  

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325281239&siteId=291194637