aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-27 10:50:11 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-27 10:50:11 +0100
commitd0c8eef61a4a9610ede96f8aaed3666d4b6264c3 (patch)
treee6dd45c220134e758a012b1320423babcba45de1 /pyaggr3g470r/views.py
parentLog timeout exception. (diff)
downloadnewspipe-d0c8eef61a4a9610ede96f8aaed3666d4b6264c3.tar.gz
newspipe-d0c8eef61a4a9610ede96f8aaed3666d4b6264c3.tar.bz2
newspipe-d0c8eef61a4a9610ede96f8aaed3666d4b6264c3.zip
Sort the result of the search.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 29965da8..4e8fa6ef 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -288,6 +288,7 @@ def search():
for article_id in results[feed_id]:
current_article = models.Article.objects(id=article_id).first()
feed.articles.append(current_article)
+ feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
result.append(feed)
return render_template('search.html', feeds=result, nb_articles=nb_articles, query=query)
bgstack15