Changing the Django Admin site title

Often the Django Admin should look a little different for the sake of your users or for the sake of yourself (running multiple django sites with identical looks and titles can be such a pain). Often users don't know what Django is, and it takes ages to explain, and even after that they have no clue. Also, often my administration has nothing to do with a website, so I don't want the text "Site administration".

First of all, you wanna add templates/admin/base_site.html to your project. This file can safely be overwritten, since it's a file that the django devs have intended for the exact purpose of customizing your admin site a bit. Here's an example of what to put in the file:

 {% extends "admin/base.html" %}  
{% load i18n %}





{% block title %}{{ title }} | {% trans 'Some Organisation' %}{% endblock %}





{% block branding %}



# {% trans 'Organisation Website' %}


{% endblock %}





{% block nav-global %}{% endblock %}

This is common practice. But I noticed after this that I was still left with an annoying "Site Administration" on the main admin index page. And this string was not inside any of the template, but rather set inside the admin view. Luckily it's quite easy to change. Assuming your language is set to English, run the following commands from your project directory:

$ mkdir locale  
$ ./manage.py makemessages -l en

Now open up the file locale/en/LC_MESSAGES/django.po and add two lines after the header information (the last two lines of this example)

 "Project-Id-Version: PACKAGE VERSION\n"  
"Report-Msgid-Bugs-To: \n"  
"POT-Creation-Date: 2010-04-03 03:25+0200\n"  
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"  
"Last-Translator: FULL NAME \n"  
"Language-Team: LANGUAGE \n"  
"MIME-Version: 1.0\n"  
"Content-Type: text/plain; charset=UTF-8\n"  
"Content-Transfer-Encoding: 8bit\n"





msgid "Site administration"  
msgstr "Main administration index"

After this, remember to run this and reload your project's server:

$ ./manage.py compilemessages