From 5fbff2420421e82498d71dddc1034fd6e9eba8e7 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 22 Sep 2014 23:18:43 +0200 Subject: Significative performance improvement for the /unread view. --- pyaggr3g470r/templates/unread.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pyaggr3g470r/templates/unread.html') diff --git a/pyaggr3g470r/templates/unread.html b/pyaggr3g470r/templates/unread.html index cdfb0dfe..9808572b 100644 --- a/pyaggr3g470r/templates/unread.html +++ b/pyaggr3g470r/templates/unread.html @@ -18,10 +18,10 @@ -

{{ feed.articles.all()|length }} {{ _('unread articles') }}.

+

{{ feed.articles|length }} {{ _('unread articles') }}.

- {% 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) %}
@@ -33,9 +33,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