Ticket #5424: admin-filter.diff

File admin-filter.diff, 1.0 KB (added by Petr Marhoun <petr.marhoun@…>, 7 years ago)
  • django/contrib/admin/templates/admin/change_list.html

    === modified file 'django/contrib/admin/templates/admin/change_list.html'
     
    2727<div id="changelist-filter">
    2828<h2>{% trans 'Filter' %}</h2>
    2929{% for spec in cl.filter_specs %}
    30    {% filter cl spec %}
     30   {% admin_list_filter cl spec %}
    3131{% endfor %}
    3232</div>
    3333{% endif %}
  • django/contrib/admin/templatetags/admin_list.py

    === modified file 'django/contrib/admin/templatetags/admin_list.py'
     
    277277    }
    278278search_form = register.inclusion_tag('admin/search_form.html')(search_form)
    279279
    280 def filter(cl, spec):
     280def admin_list_filter(cl, spec):
    281281    return {'title': spec.title(), 'choices' : list(spec.choices(cl))}
    282 filter = register.inclusion_tag('admin/filter.html')(filter)
     282admin_list_filter = register.inclusion_tag('admin/filter.html')(admin_list_filter)
Back to Top