From 83e10c058a42796fe94bf4a93791bf3883ae51fb Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Tue, 8 Apr 2014 22:37:41 +0200 Subject: /unread and /like views are working. --- pyaggr3g470r/templates/favorites.html | 12 ++++++------ pyaggr3g470r/templates/unread.html | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/favorites.html b/pyaggr3g470r/templates/favorites.html index c073cfde..50378d3c 100644 --- a/pyaggr3g470r/templates/favorites.html +++ b/pyaggr3g470r/templates/favorites.html @@ -13,12 +13,12 @@

{{ feed.title|safe }}

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

{% else %}

{% endif %} {{ feed.articles[n].title|safe }} diff --git a/pyaggr3g470r/templates/unread.html b/pyaggr3g470r/templates/unread.html index 0dc64f66..1a586435 100644 --- a/pyaggr3g470r/templates/unread.html +++ b/pyaggr3g470r/templates/unread.html @@ -17,10 +17,10 @@ -

{{ feed.articles|length }} unread articles.

+

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

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

{% else %}

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