Categories
Python Answers

How to change the header ‘Django administration’ text with Python Django admin?

Spread the love

Sometimes, we want to change the header ‘Django administration’ text with Python Django admin.

In this article, we’ll look at how to change the header ‘Django administration’ text with Python Django admin.

How to change the header ‘Django administration’ text with Python Django admin?

To change the header ‘Django administration’ text with Python Django admin, we set the admin.site.site_header property.

For instance, we write

from django.contrib import admin

admin.site.site_header = 'My project'          
admin.site.index_title = 'Features area'          
admin.site.site_title = 'HTML title from adminsitration'

in urls.py to set the admin.site properties to set the site header, index title, and site title.

site_header set the site’s title.

Conclusion

To change the header ‘Django administration’ text with Python Django admin, we set the admin.site.site_header property.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *