aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
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