1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

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
This commit is contained in:
Adrian Holovaty 2007-01-19 03:51:41 +00:00
parent f9019a7a7b
commit 2ea6cdbd9d
3 changed files with 12 additions and 12 deletions

View File

@ -21,7 +21,18 @@
<div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist"> <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist">
{% block search %}{% search_form cl %}{% endblock %} {% block search %}{% search_form cl %}{% endblock %}
{% block date_hierarchy %}{% date_hierarchy 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 result_list %}{% result_list cl %}{% endblock %}
{% block pagination %}{% pagination cl %}{% endblock %} {% block pagination %}{% pagination cl %}{% endblock %}
</div> </div>

View File

@ -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 File

@ -264,7 +264,3 @@ search_form = register.inclusion_tag('admin/search_form.html')(search_form)
def filter(cl, spec): def filter(cl, spec):
return {'title': spec.title(), 'choices' : list(spec.choices(cl))} return {'title': spec.title(), 'choices' : list(spec.choices(cl))}
filter = register.inclusion_tag('admin/filter.html')(filter) filter = register.inclusion_tag('admin/filter.html')(filter)
def filters(cl):
return {'cl': cl}
filters = register.inclusion_tag('admin/filters.html')(filters)