Twenty-sixth of django--admin management background: modify the title of the login page, modify the title of the login box, modify the title of the homepage

I. Introduction

First of all:

①. In the admin management background, the default value of the login page title is: [Login | Django Site Administrator];

②. In the admin management background, the default value of the title of the login box is: [Django Management];

③. In the admin management background, the title of the home page is: [Site Management | Django Site Administrator];

 

 

Then, we can modify these three values, such as:

①. In the admin management background, change the title of the login page to: [Login | System background];

②. In the admin management background, the title of the login box is changed to: [lucas project management system];

③. In the admin management background, the title of the homepage is: [Background Homepage | System Backstage]; 

The specific implementation can be seen in the following complete operation process;

 

2. Complete operation steps

1. The first step: View the source code of [site.py]

 

 

 

2. Step 2: Rewrite the attribute values ​​of the three attributes in [admin.py] in the directory where the application [hello] is located

admin.site.site_title = "系统后台"

admin.site.site_header = "lucas的项目管理系统"

admin.site.index_title = "后台主页"

3. Step 3: Restart the service

4. Step 4: Log out and successfully log in to the admin management background again

5. Step 5: View the latest login page title & login box title & home page title

 

 

 

Guess you like

Origin blog.csdn.net/LYX_WIN/article/details/114676144