Code

Ticket #13629: more-classes-in-admin.patch

File more-classes-in-admin.patch, 3.3 KB (added by patrick91, 3 years ago)
  • django/contrib/admin/options.py

     
    11641164            'media': media, 
    11651165            'has_add_permission': self.has_add_permission(request), 
    11661166            'root_path': self.admin_site.root_path, 
     1167            'opts': opts, 
    11671168            'app_label': app_label, 
    11681169            'action_form': action_form, 
    11691170            'actions_on_top': self.actions_on_top, 
  • django/contrib/admin/templates/admin/change_list.html

     
    3333{% endif %}{% endif %} 
    3434{% endblock %} 
    3535 
    36 {% block bodyclass %}change-list{% endblock %} 
     36{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-list{% endblock %} 
    3737 
    3838{% if not is_popup %} 
    3939  {% block breadcrumbs %} 
  • django/contrib/admin/templates/admin/delete_selected_confirmation.html

     
    11{% extends "admin/base_site.html" %} 
    22{% load i18n l10n %} 
    33 
     4{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} delete-confirmation delete-selected-confirmation{% endblock %} 
     5 
    46{% block breadcrumbs %} 
    57<div class="breadcrumbs"> 
    68     <a href="../../">{% trans "Home" %}</a> &rsaquo; 
  • django/contrib/admin/templates/admin/index.html

     
    55 
    66{% block coltype %}colMS{% endblock %} 
    77 
    8 {% block bodyclass %}dashboard{% endblock %} 
     8{% block bodyclass %}dashboard {{ app_label|default:"home" }}{% endblock %} 
    99 
    1010{% block breadcrumbs %}{% endblock %} 
    1111 
  • django/contrib/admin/templates/admin/delete_confirmation.html

     
    11{% extends "admin/base_site.html" %} 
    22{% load i18n %} 
    33 
     4{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} delete-confirmation{% endblock %} 
     5 
    46{% block breadcrumbs %} 
    57<div class="breadcrumbs"> 
    68     <a href="../../../../">{% trans "Home" %}</a> &rsaquo; 
  • django/contrib/admin/sites.py

     
    419419            'title': _('%s administration') % capfirst(app_label), 
    420420            'app_list': [app_dict], 
    421421            'root_path': self.root_path, 
     422            'app_label': app_label, 
    422423        } 
    423424        context.update(extra_context or {}) 
    424425        context_instance = template.RequestContext(request, current_app=self.name)