Bradley Kirton's Blog

Published on May 21, 2023

Go home

How to customise AdminSite attributes

The django AdminSite provides the following attributes. You may wish to provide a custom value for some of these like the site_header and site_title.

To provide custom values for the admin site header and title, add the following snippet your project's where the admin site resource is registered.

from django.urls import path
from django.contrib import admin
from django.contrib.auth import models as auth_models = "My Site" = "My Site Header"

The site_title is placed in the \<title\> after the |. So the above will yield \<title>Site administration | My Site\<\\title\>.