Django change admin page label 'Auth' to 'Authentication'

How to change the display shortcut Authin Django admin control panel to Authentication?

+3
source share
2 answers

There is currently no easy / elegant way to do this. Customizable app labeling has been a painful point for some time. You can override admin/index.html and enter javascript code to change the marking. Note that you can also change admin.site.index_templateto something like "admin/my_index.html", which you can then use {% extends "admin/index.html" %}to store DRYer stuff.

Of course, in the administrator there are other areas in which "Auth" will also appear, for example, in "admin/app_index.html"breadcrumbs, etc.

+1
source

I assume that if you overwrite admin / index.html, you can hardcode the logic in the template instead of any javascript:

<caption><a href="{{ app.app_url }}" class="section">
        {% ifequal app.name "Auth" %}
                {% trans 'Authentication' %}
        {% else %}
                {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
        {% endifequal %}
</a></caption>
0
source

All Articles