Ticket #13629: 0001-Closes-13629-add-app-model_name-class-to-body-tag.patch

File 0001-Closes-13629-add-app-model_name-class-to-body-tag.patch, 1.5 KB (added by Kenneth Belitzky, 14 years ago)
  • django/contrib/admin/options.py

    From f667d381798d780a45f3895ba04a873720261712 Mon Sep 17 00:00:00 2001
    From: Kenneth Belitzky <kenny@belitzky.com>
    Date: Sun, 11 Jul 2010 03:21:36 -0300
    Subject: [PATCH] Closes #13629 - add app-model_name class to <body> tag
    
    ---
     django/contrib/admin/options.py                    |    1 +
     .../contrib/admin/templates/admin/change_list.html |    2 +-
     2 files changed, 2 insertions(+), 1 deletions(-)
    
    diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
    index 1f8ff6d..11e1cd1 100644
    a b class ModelAdmin(BaseModelAdmin):  
    10771077            'has_add_permission': self.has_add_permission(request),
    10781078            'root_path': self.admin_site.root_path,
    10791079            'app_label': app_label,
     1080            'opts': opts,
    10801081            'action_form': action_form,
    10811082            'actions_on_top': self.actions_on_top,
    10821083            'actions_on_bottom': self.actions_on_bottom,
  • django/contrib/admin/templates/admin/change_list.html

    diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html
    index 3b037e5..878b8e7 100644
    a b  
    3333{% endif %}{% endif %}
    3434{% endblock %}
    3535
    36 {% block bodyclass %}change-list{% endblock %}
     36{% block bodyclass %}{{ app_label }}-{{ opts.object_name.lower }} change-list{% endblock %}
    3737
    3838{% if not is_popup %}
    3939  {% block breadcrumbs %}
Back to Top