Modify Title and Header Django Admin Interface

Adi Ramadhan
2 min readJul 1, 2020

Small customization django admin site. Oficial doc here.
Jump to summarized section in the end of the article for short version.

Modify Site Header

Default login page and admin interface

add code below in project_folder/urls.py

from django.contrib import admin
admin.site.site_header = 'Book List Administration'
Modified site header

Modify Site Title
add code below in project_folder/urls.py

from django.contrib import admin
admin.site.site_title = 'Book Site'
Default vs Customized Site Title

Modify Index Title “Site Administration”
add code below in project_folder/urls.py

from django.contrib import admin
admin.site.index_title= 'Book Site Administration'
Modified index_title

Modify Site URL
By default Django Admin interface provides “View site” link and redirect to “/” or http://127.0.0.1:8000/ for local default. We can change to other urls, /admin for example by add code below in project_folder/urls.py.

from django.contrib import admin
admin.site.site_url= '/admin'
‘view site’ link will redirect to ‘/admin’ link

Summarized Section
add code below project_folder/urls.py.
#Modify Site Header
admin.site.site_header = ‘Book List Administration’
#Modify Site Title
admin.site.site_title = ‘Book Site’
#Modify Site Index Title
admin.site.index_title = ‘Book Site Administration’
#Modify Site URL
admin.site.site_urls= ‘/admin’

--

--