To make our admin site feel less generic, we'll replace the default title and header at the top of the pages.
Create a new directory called admin under the directory mycompany/templates
. Copy the django/contrib/admin/templates/base_site.html
file to your templates/admin
directory. This is the first file we'll be overriding.
In our admin pages, the page title is presented in this format:
<title>Site administration | Django site admin</title>
This can be changed by editing the title
block in base_site.html
. Open the mycompany/templates/admin/site_base.html
file and edit the block that looks like this:
{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %}
Replace the text in quotes after the pipe symbol with our site's title:
{% block title %}{{ title }} | {% trans 'MyCompany Administration' %}{% endblock %}