Open In App

How to add Site Header, Site Title, Index Title in a Django Project?

Automatic admin interface one of the most powerful parts of Django. Metadata is read from your models to provide a quick, model-centric interface where trusted users can manage content on your site. The admin’s recommended use is limited to an organization’s internal management tool. It’s not intended for building your entire front end around.

OVERVIEW:



Make following changes in urls.py – 




from django.contrib import admin
from django.urls import path, include
 
# Adds site header, site title, index title to the admin side.
admin.site.site_header = 'Geeks For Geeks'
admin.site.site_title = 'GFG'
admin.site.index_title = 'Welcome Geeks'
 
urlpatterns = [
    path('', include('main.urls')),
    path('admin/', admin.site.urls),
]

Output –



DJANGO ADMIN CUSTOMISATION: 

The Python code enables to add site_header, site_heading and  index_title.

Article Tags :