From 2bd9ab12c2f3551e6ad2ffa05282d87711adbf6b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sat, 12 Apr 2014 16:01:13 +0200 Subject: The /home page is now loading faster. --- pyaggr3g470r/templates/home.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pyaggr3g470r/templates/home.html') diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index 6363ee06..6448fc15 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -1,10 +1,10 @@ {% extends "layout.html" %} {% block content %}
- {% if user.feeds.all()|count == 0 %} + {% if result|count == 0 %}

You are not subscribed to any feed. Fix this.

{% else %} - {% for feed in user.feeds|sort(attribute="title") %} + {% for feed in result|sort(attribute="title") %}

{{ feed.title|safe }}

@@ -17,7 +17,7 @@
- {% for number in range(0, feed.articles[0:9]|count-(feed.articles[0:9]|count % 3), 3) %} + {% for number in range(0, feed.articles.all()|count-(feed.articles.all()|count % 3), 3) %}
{% for n in range(number, number+3) %}
@@ -29,9 +29,9 @@ {% endfor %}
{% endfor %} - {% if feed.articles[0:9]|count % 3 != 0 %} + {% if feed.articles.all()|count % 3 != 0 %}
- {% for n in range(feed.articles[0:9]|count-(feed.articles[0:9]|count % 3), feed.articles[0:9]|count) %} + {% for n in range(feed.articles.all()|count-(feed.articles.all()|count % 3), feed.articles.all()|count) %}
{% if feed.articles[n].readed %}

{% else %}

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