Can't customize "Django administration"

Hello,

I want to change the form title of the login form of the Admin site:
Screenshot_9-11-2024_113043_127.0.0.1

So I look into contrib/admin/templates/admin/login.html and find that it is extending admin/base_site.html and there there’s this line:

<div id="site-name"><a href="{% url 'admin:index' %}">{{ site_header|default:_('Django administration') }}</a></div>

So I add these to the urls.py of the project:

admin.site.site_header = 'سایت آرتا شبکه صنعت رایان'
admin.site.site_title = 'سایت آرتا شبکه صنعت رایان'
admin.site.index_title = 'پنل مدیریت'

But they have no effect although when I log into Admin site I see them.

So is this a bug or I’m doing it wrong?

I was able to try what you did above and it seems to work for me. This is what I see.

Thank you. This made me look into somewhere else and find the issue.

1 Like