Open In App
Related Articles

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

Improve Article
Save Article
Like Article

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.


  • Add ‘django.contrib.admin’ along with its dependencies – django.contrib.auth, django.contrib.contenttypes, django.contrib.messages, and django.contrib.sessions – to your INSTALLED_APPS setting.
  • Configure a DjangoTemplates backend in your TEMPLATES setting with django.template.context_processors.request, django.contrib.auth.context_processors.auth, and django.contrib.messages.context_processors.messages in the ‘context_processors’ option of OPTIONS.
  • If you have used customised MIDDLEWARE setting, django.contrib.auth.middleware.AuthenticationMiddleware and django.contrib.messages.middleware.MessageMiddleware must be included.

Make following changes in – 


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

Output –


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

Last Updated : 08 Jun, 2022
Like Article
Save Article
Similar Reads
Related Tutorials