[Django] #24740: AdminSite site title

17 views
Skip to first unread message

Django

unread,
May 3, 2015, 5:09:42 AM5/3/15
to django-...@googlegroups.com
#24740: AdminSite site title
-------------------------------+--------------------
Reporter: drakkan | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.admin | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/24740>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 4, 2015, 8:37:03 AM5/4/15
to django-...@googlegroups.com
#24740: AdminSite site title
-------------------------------+--------------------------------------
Reporter: drakkan | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* status: new => closed
* needs_docs: => 0
* resolution: => worksforme
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24740#comment:1>

Django

unread,
May 4, 2015, 1:05:16 PM5/4/15
to django-...@googlegroups.com
#24740: AdminSite site title
-------------------------------+--------------------------------------
Reporter: drakkan | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by drakkan):

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>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24740#comment:2>

Django

unread,
May 4, 2015, 2:53:55 PM5/4/15
to django-...@googlegroups.com
#24740: AdminSite site title
-------------------------------+--------------------------------------
Reporter: drakkan | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by claudep):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/24740#comment:3>

Django

unread,
May 4, 2015, 3:13:12 PM5/4/15
to django-...@googlegroups.com
#24740: AdminSite site title
-------------------------------+--------------------------------------
Reporter: drakkan | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 1.8
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by drakkan):

you are right the problem is in django_admin_bootstrapped sorry for the
annoiance

--
Ticket URL: <https://code.djangoproject.com/ticket/24740#comment:4>

Reply all
Reply to author
Forward
0 new messages