diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-13 23:31:14 +0200 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-10-13 23:31:14 +0200 |
commit | 153724fc133f461dd800e4af2e591752489204b5 (patch) | |
tree | 6f283d389a89856ad57b988c7b0713047ef23fa5 /pyaggr3g470r/feedgetter.py | |
parent | fixed bug in /articles page. (diff) | |
download | newspipe-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.py | 2 |
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() |