only cache the part depending on the query (bug 560337)

This commit is contained in:
Jeff Balogh 2010-04-20 10:44:44 -07:00
Родитель 805bc7533d
Коммит 2f32b85880
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -1,5 +1,4 @@
{% set search_form = SearchForm(request) %}
{% cache search_form.queryset %}
{% set show_advanced = search_form.advanced.data == 'on' %}
<div class="search-form expanded-search-form {% if show_advanced %}expanded{% endif %}">
<form method="get" id="search-form" action="{{ url('search.search') }}">
@ -63,9 +62,11 @@
</fieldset>
<span id="search-data"
data-version="{{ request.REQUEST.get('lver', 'any') }}"
data-appversions="{{ search_form.get_app_versions()|json }}"></span>
{% cache search_form.queryset %}
data-appversions="{{ search_form.get_app_versions()|json }}">
{% endcache %}
</span>
{{ search_form.advanced|safe }}
</div> {# advanced-search #}
</form>
</div>
{% endcache %}