From 0853263f38d6f54b2a6978d31bba643d3f1f156e Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 23 Sep 2014 06:56:24 +0200 Subject: Significative performance improvement for the /favorites view. --- pyaggr3g470r/templates/favorites.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/favorites.html b/pyaggr3g470r/templates/favorites.html index 9be16692..210f7343 100644 --- a/pyaggr3g470r/templates/favorites.html +++ b/pyaggr3g470r/templates/favorites.html @@ -18,7 +18,7 @@ - {% for number in range(0, feed.articles.all()|length-(feed.articles.all()|length % 3), 3) %} + {% for number in range(0, feed.articles|length-(feed.articles|length % 3), 3) %}
{% for n in range(number, number+3) %}
@@ -30,9 +30,9 @@ {% endfor %}
{% endfor %} - {% if feed.articles.all()|length % 3 != 0 %} + {% if feed.articles|length % 3 != 0 %}
- {% for n in range(feed.articles.all()|length-(feed.articles.all()|length % 3), feed.articles.all()|length) %} + {% for n in range(feed.articles|length-(feed.articles|length % 3), feed.articles|length) %}
{% if feed.articles[n].readed %}

{% else %}

{% endif %} {{ feed.articles[n].title|safe }} -- cgit