#16915: contrib.admin should use a variable to select base_site template -------------------------+------------------------------- Reporter: CBWhiz | Owner: nobody Type: New feature | Status: new Milestone: | Component: contrib.admin Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------+------------------------------- Currently, I have two AdminSite instances. I'd like them to be customized in different ways. For this example, suppose I want a different branding for each section (say 'Warehouse Admin' and 'Content Admin') at the top of every admin page.
The current suggested way to customize the admin is to create a new `admin/base_site.html` file and fill in the `branding` and `title` blocks. However, in the scenario above, both AdminSite instances will use the same base_site template. I suggest AdminSite be given a new instance level attribute called `base_template_name`, have all admin views pass this variable to the template context (or create an admin ContextProcessor), and change each admin template from `{% extends "admin/base_site.html" %}` to `{% extends admin_base %}`. Another option would be just changing the subdirectory of the include (that is, allow each AdminSite to change the '/admin' default). I suspect this may be able to be solved externally from the AdminSite and templates with a customized TemplateLoader, but i'm not sure how to best indicate that a particular TemplateLoader be used for a particular view response, as that seems to be a global list in the settings module. -- Ticket URL: <https://code.djangoproject.com/ticket/16915> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.