From 153724fc133f461dd800e4af2e591752489204b5 Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Sun, 13 Oct 2013 23:31:14 +0200 Subject: Trying to sort articles (SortedListField(ReferenceField('Article')). --- pyaggr3g470r/templates/article.html | 3 ++- pyaggr3g470r/templates/articles.html | 2 +- pyaggr3g470r/templates/home.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/article.html b/pyaggr3g470r/templates/article.html index 28c53714..d695a423 100644 --- a/pyaggr3g470r/templates/article.html +++ b/pyaggr3g470r/templates/article.html @@ -2,9 +2,10 @@ {% block content %}
-

{{ article.title }}

+

{{ article.title }}

{{ article.link }}

{{ article.date }}
+
{{ article.content|safe }} diff --git a/pyaggr3g470r/templates/articles.html b/pyaggr3g470r/templates/articles.html index 146769ac..c0abccdf 100644 --- a/pyaggr3g470r/templates/articles.html +++ b/pyaggr3g470r/templates/articles.html @@ -1,7 +1,7 @@ {% extends "layout.html" %} {% block content %}
- {% for number in range(0, feed.articles|sort(attribute='date')|length-2, 3) %} + {% for number in range(0, feed.articles|length-2, 3) %}
{% for n in range(number, number+3) %}
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index aa390d2d..0344263f 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -8,7 +8,7 @@
- {% for number in range(0, feed.articles|sort(attribute='date')|length-2, 3) %} + {% for number in range(0, feed.articles|length-2, 3) %}
{% for n in range(number, number+3) %}
-- cgit