[Fixed]-How to change the name of the Django admin page?


You need to do

{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">Mysite</a></h1>
{% endblock %}

Better way

Simply go to urls.py of your project and add this outside urlpatterns.

admin.site.site_header = 'My Site Admin Panel'
admin.site.site_title = 'My Site Title'

make sure, below line is included at top.

from django.contrib import admin


Use this part of code in your admin.py:

from django.contrib import admin

admin.site.site_title = "<your_title>"
admin.site.site_header = "<your_header>"
admin.site.index_title = "<your_index_title>"


You can change site title, site header and index title in Django Admin as shown below. *You can see my answer explaining it in detail:

# "admin.py"

from django.contrib import admin

admin.site.site_title = 'My site title'
admin.site.site_header = 'My site header'
admin.site.index_title = 'My index title'

Leave a comment