forked from django/django
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added AdminSite attributes for easily changing admin title.
AdminSite now has overridable site_header, site_title and index_title attributes. Changed each admin view to pass these to the context (in a new AdminSite.each_context() method). The intent here is to make it easier to override these things in the common case, instead of having to override a template, which is a bigger burden.
- Loading branch information
1 parent
273a1e6
commit a962286
Showing
4 changed files
with
115 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
{% extends "admin/base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock %} | ||
{% block title %}{{ title }} | {{ site_title }}{% endblock %} | ||
|
||
{% block branding %} | ||
<h1 id="site-name">{% trans 'Django administration' %}</h1> | ||
<h1 id="site-name">{{ site_header }}</h1> | ||
{% endblock %} | ||
|
||
{% block nav-global %}{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters