aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-27 17:45:21 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-27 17:45:21 +0100
commit2aaf32143621cad5c1cecd714e6b63413ef7edc8 (patch)
treeb2df6b147a74ba690c2045d8d3608bc512d44c3f /pyaggr3g470r/views.py
parentSort articles on the main page. (diff)
downloadnewspipe-2aaf32143621cad5c1cecd714e6b63413ef7edc8.tar.gz
newspipe-2aaf32143621cad5c1cecd714e6b63413ef7edc8.tar.bz2
newspipe-2aaf32143621cad5c1cecd714e6b63413ef7edc8.zip
Updated importer.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 517369fe..f2cfc095 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -18,11 +18,8 @@ mail = Mail()
@app.route('/')
def home():
#feeds = models.Feed.objects().order_by('title').fields(slice__articles=[0,9])
- #feeds = models.Feed.objects().fields(slice__articles=[0,9])
- feeds = models.Feed.objects()
- for feed in feeds:
- feed.articles = sorted(feed.articles, key=lambda t: t.date, reverse=True)
- return render_template('home.html', feeds=feeds.fields(slice__articles=[0,9]))
+ feeds = models.Feed.objects().fields(slice__articles=[0,9])
+ return render_template('home.html', feeds=feeds)
@app.route('/fetch/', methods=['GET'])
def fetch():
bgstack15