Change django administration title

There are two ways to change them.

  1. Create //templates/admin/base_site.html file with the following content

    {% extends "admin/base.html" %}
    {% block title %}{{ title }} | Your website title here {% endblock %}
    
    {% block branding %}
    
    <h1 id="site-name">
        <a href="{% url 'admin:index' %}">Your website title here</a>
    </h1>
    {% endblock %}
    

    The original file is https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/base_site.html

  2. Change settings.py and urls.py

    $ vi settings.py
    ...
    ADMIN_SITE_HEADER = "My shiny new administration"
    ...
    
    $ vi urls.py
    from django.conf import settings
    ...
    admin.site.site_title = settings.ADMIN_SITE_HEADER
    admin.site.site_header = settings.ADMIN_SITE_HEADER
    ...
    

    Source: http://stackoverflow.com/questions/4938491/django-admin-change-header-django-administration-text

Leave a Reply

Your email address will not be published. Required fields are marked *