From bb145e2c47d71b7f68280c00ced727442d2effa2 Mon Sep 17 00:00:00 2001 From: Thomas Sorrel Date: Sun, 21 Jul 2013 11:02:36 +0200 Subject: [PATCH] Fixed #13629 -- Added CSS classes to the `` tag of some admin templates to allow style customizations per app or per model. --- AUTHORS | 1 + django/contrib/admin/sites.py | 1 + .../admin/templates/admin/app_index.html | 2 + .../admin/templates/admin/change_form.html | 2 +- .../admin/templates/admin/change_list.html | 2 +- .../templates/admin/delete_confirmation.html | 2 + .../admin/delete_selected_confirmation.html | 2 + docs/releases/1.6.txt | 4 ++ tests/admin_views/tests.py | 53 +++++++++++++++++++ 9 files changed, 67 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 640a31b7ba..a7f12d6e48 100644 --- a/AUTHORS +++ b/AUTHORS @@ -544,6 +544,7 @@ answer newbie questions, and generally made Django that much better: George Song sopel Leo Soto + Thomas Sorrel Wiliam Alves de Souza Don Spaulding Calvin Spealman diff --git a/django/contrib/admin/sites.py b/django/contrib/admin/sites.py index e0f43dfbfe..8abf49331b 100644 --- a/django/contrib/admin/sites.py +++ b/django/contrib/admin/sites.py @@ -439,6 +439,7 @@ class AdminSite(object): context = { 'title': _('%s administration') % capfirst(app_label), 'app_list': [app_dict], + 'app_label': app_label, } context.update(extra_context or {}) diff --git a/django/contrib/admin/templates/admin/app_index.html b/django/contrib/admin/templates/admin/app_index.html index 9f65357292..7aff935126 100644 --- a/django/contrib/admin/templates/admin/app_index.html +++ b/django/contrib/admin/templates/admin/app_index.html @@ -1,6 +1,8 @@ {% extends "admin/index.html" %} {% load i18n %} +{% block bodyclass %}app-{{ app_label }} {{ block.super }}{% endblock %} + {% if not is_popup %} {% block breadcrumbs %}