#24740 closed Uncategorized (worksforme)
AdminSite site title
Reported by: | Nicola | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Using AdminSite to customize admin site title does not work 100%
following the docs here:
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#customizing-the-adminsite-class
almost work but the html title still has "Django administration", basically in base_site.html
{% block title %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
"title" seems not customizable while "site_title" is customizable
Change History (4)
comment:1 by , 10 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
Tim,
I would like to remove "Django administration" before the vertical bar, site_title works as you stated to change the text after the vertical bar,
I have this on each page
<title>Django administration | MyCustomizedSiteTitle</title>
comment:3 by , 10 years ago
That's strange, because the left side of the title tag is set by the view and changes for each type of admin page. The right side is AdminSite.site_title
and the page main h1 tag is AdminSite.site_header
.
Check if your admin templates are not overridden by some app.
comment:4 by , 10 years ago
you are right the problem is in django_admin_bootstrapped sorry for the annoiance
Use
AdminSite.site_title
if you want to customize what's after the vertical bar.{{ title }}
displays the page title which is different for each page.