Skip to content
Snippets Groups Projects
Commit 3b85e730 authored by Hovhannes Dabaghyan's avatar Hovhannes Dabaghyan
Browse files

Use count query instead of retrieving list and counting list length.

parent b6880d11
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="wrapper wrapper--medium"> <div class="wrapper wrapper--medium">
<h3>Search Results</h3> <h3>Search Results</h3>
{% if search_term %} {% if search_term %}
<h5>There are {{ object_list|length }} results for: {{ search_term }}</h5> <h5>There are {{ object_list.count }} results for: {{ search_term }}</h5>
{% endif %} {% endif %}
</div> </div>
{% endblock %} {% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment