From e055d147c3ac04ab7459cd19a15143ad7069bc4f Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Mon, 11 Nov 2013 18:04:05 +0100 Subject: Sort feeds by title with Jinja sort() function. --- pyaggr3g470r/templates/favorites.html | 2 +- pyaggr3g470r/templates/feeds.html | 2 +- pyaggr3g470r/templates/home.html | 2 +- pyaggr3g470r/templates/unread.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'pyaggr3g470r/templates') diff --git a/pyaggr3g470r/templates/favorites.html b/pyaggr3g470r/templates/favorites.html index c3f1bc4d..41abc4a6 100644 --- a/pyaggr3g470r/templates/favorites.html +++ b/pyaggr3g470r/templates/favorites.html @@ -4,7 +4,7 @@ {% if feeds|count == 0 %}

No favorites.

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

{{ feed.title }}

diff --git a/pyaggr3g470r/templates/feeds.html b/pyaggr3g470r/templates/feeds.html index ce9f658e..b2009fac 100644 --- a/pyaggr3g470r/templates/feeds.html +++ b/pyaggr3g470r/templates/feeds.html @@ -15,7 +15,7 @@ - {% for feed in feeds %} + {% for feed in feeds|sort(attribute="title") %} {{ loop.index }} {{ feed.title }} diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html index e79d0603..c00b6c5c 100644 --- a/pyaggr3g470r/templates/home.html +++ b/pyaggr3g470r/templates/home.html @@ -4,7 +4,7 @@ {% if feeds|count == 0 %}

You are not subscribed to any feed. Fix this.

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

{{ feed.title }}

diff --git a/pyaggr3g470r/templates/unread.html b/pyaggr3g470r/templates/unread.html index 40dda336..896b1372 100644 --- a/pyaggr3g470r/templates/unread.html +++ b/pyaggr3g470r/templates/unread.html @@ -4,7 +4,7 @@ {% if feeds|count == 0 %}

No unread articles.

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

{{ feed.title }}

-- cgit