python - `Django administration` to the custom title in project templates -


in django admin panel, have requirement, how can change the: django administration custom title?

enter image description here

i followed post, not give clear steps.

i copy django/contrib/admin/templates project /templates/admin, , changed /templates/admin/base_site.html:

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

you see, changed django django11, in browser, not change @ all.

the other post on stackoverflow steps punch-drunk, can tell me should more requirement? there need configurations of project settings? or else?

no need copy , change admin template

in project urls.py put

admin.site.site_header = 'mysite admin panel' admin.site.site_title = 'mysite admin panel' 

alternatively:

after copying django/contrib/admin/templates/admin/base_site.html put this

base_site.html

 {% extends "admin/base.html" %}   {% block title %}mysite admin panel{% endblock %}   {% block branding %}      <h1 id="site-name"><a href="{% url 'admin:index' %}">mysite admin panel</a></h1>  {% endblock %}   {% block nav-global %}{% endblock %} 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -