Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newforms-admin: Removed 'filters' admin_list templatetag, folding its…

… output into the change_list.html template

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2ea6cdbd9db1ad5216fcc9b5d33034a981e2142d 1 parent f9019a7
@adrianholovaty adrianholovaty authored
View
13 django/contrib/admin/templates/admin/change_list.html
@@ -21,7 +21,18 @@
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %}
{% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %}
-{% block filters %}{% filters cl %}{% endblock %}
+
+{% block filters %}
+{% if cl.has_filters %}
+<div id="changelist-filter">
+<h2>{% trans 'Filter' %}</h2>
+{% for spec in cl.filter_specs %}
+ {% filter cl spec %}
+{% endfor %}
+</div>
+{% endif %}
+{% endblock %}
+
{% block result_list %}{% result_list cl %}{% endblock %}
{% block pagination %}{% pagination cl %}{% endblock %}
</div>
View
7 django/contrib/admin/templates/admin/filters.html
@@ -1,7 +0,0 @@
-{% load admin_list %}
-{% load i18n %}
-{% if cl.has_filters %}<div id="changelist-filter">
-<h2>{% trans 'Filter' %}</h2>
-{% for spec in cl.filter_specs %}
- {% filter cl spec %}
-{% endfor %}</div>{% endif %}
View
4 django/contrib/admin/templatetags/admin_list.py
@@ -264,7 +264,3 @@ def search_form(cl):
def filter(cl, spec):
return {'title': spec.title(), 'choices' : list(spec.choices(cl))}
filter = register.inclusion_tag('admin/filter.html')(filter)
-
-def filters(cl):
- return {'cl': cl}
-filters = register.inclusion_tag('admin/filters.html')(filters)
Please sign in to comment.
Something went wrong with that request. Please try again.