qulzam
qulzam

Reputation: 325

customize the django admin panel?

I want to change the django bydefault admin panel title bar where wirte the django administration. Actually I want to replace the django administration with the my site name.

Upvotes: 5

Views: 7886

Answers (2)

qulzam
qulzam

Reputation: 325

I found out the solution: Make the file in notpad

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

{% block title %}{{ title }} | {% trans 'Your Customize name' %}{% endblock %}

{% block branding %}
<h1 id="site-name">{% trans 'Your Customize name administration' %}</h1>
{% endblock %}

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

and then save the above file with the name "base_site.html" in the folder name "admin" of your project directory. Also give the path of admin parent directory in the settings.py file under TEMPLATE_DIRS in inverted commas.

Upvotes: 6

Related Questions