Django Admin Cookbook-1 How do I change management background Django Admin title Django administration

1. How do I change management background Django Admin title Django administration?

By default, Django Admin management background display "Django administration". Suppose you want to replace it with "UMSRA Management"

Django administration displayed on the following page:

  • log in page
  • List View page
  • HTML title tags

1.1. Sign in, view and change the list view page

Below, the default setting is "Django administration"

You can change the text displayed by modifying site_header.

1.2. List View page

Below, the default setting is "Site administration"

You can change the text displayed by modifying index_title.

1.3. HTML title tag

Below, the default setting is "Django site admin"

You can change the text displayed by modifying site_title.

We can make changes in the configuration of these three urls.py in:

admin.site.site_header = "UMSRA Admin"
admin.site.site_title = "UMSRA Admin Portal"
admin.site.index_title = "Welcome to UMSRA Researcher Portal"

Back to Contents

Guess you like

Origin www.cnblogs.com/superhin/p/12159853.html