aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/feedgetter.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 23:31:14 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 23:31:14 +0200
commit153724fc133f461dd800e4af2e591752489204b5 (patch)
tree6f283d389a89856ad57b988c7b0713047ef23fa5 /pyaggr3g470r/feedgetter.py
parentfixed bug in /articles page. (diff)
downloadnewspipe-153724fc133f461dd800e4af2e591752489204b5.tar.gz
newspipe-153724fc133f461dd800e4af2e591752489204b5.tar.bz2
newspipe-153724fc133f461dd800e4af2e591752489204b5.zip
Trying to sort articles (SortedListField(ReferenceField('Article')).
Diffstat (limited to 'pyaggr3g470r/feedgetter.py')
-rw-r--r--pyaggr3g470r/feedgetter.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyaggr3g470r/feedgetter.py b/pyaggr3g470r/feedgetter.py
index 487fa3b0..491d110c 100644
--- a/pyaggr3g470r/feedgetter.py
+++ b/pyaggr3g470r/feedgetter.py
@@ -102,7 +102,6 @@ class FeedGetter(object):
exist = models.Article.objects(link=article.link).first()
if exist != None:
- print("Already downloaded!")
continue
description = ""
@@ -149,6 +148,7 @@ class FeedGetter(object):
article_title, description)).start()
"""
feed.articles.extend(articles)
+ feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
feed.save()
bgstack15