From a962286b74f1e8c8cb19fb45a057800da8c2fb56 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 6 Sep 2013 12:31:44 -0500 Subject: 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. --- docs/ref/contrib/admin/index.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index ba5fa3bff6..4a96d73604 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -2162,7 +2162,7 @@ creating your own ``AdminSite`` instance (see below), and changing the Python class), and register your models and ``ModelAdmin`` subclasses with it instead of using the default. - When constructing an instance of an ``AdminSite``, you are able to provide + When constructing an instance of an ``AdminSite``, you can provide a unique instance name using the ``name`` argument to the constructor. This instance name is used to identify the instance, especially when :ref:`reversing admin URLs `. If no instance name is @@ -2174,6 +2174,21 @@ creating your own ``AdminSite`` instance (see below), and changing the Templates can override or extend base admin templates as described in `Overriding Admin Templates`_. +.. versionadded:: 1.6 +.. attribute:: AdminSite.site_header + The text to put at the top of each admin page, as an ``

`` (a string). + By default, this is "Django administration". + +.. versionadded:: 1.6 +.. attribute:: AdminSite.site_title + The text to put at the end of each admin page's ```` (a string). By + default, this is "Django site admin". + +.. versionadded:: 1.6 +.. attribute:: AdminSite.index_title + The text to put at the top of the admin index page (a string). By default, + this is "Site administration". + .. attribute:: AdminSite.index_template Path to a custom template that will be used by the admin site main index -- cgit v1.3