aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/templates/home.html2
-rw-r--r--pyaggr3g470r/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/templates/home.html b/pyaggr3g470r/templates/home.html
index 614ad269..7aede342 100644
--- a/pyaggr3g470r/templates/home.html
+++ b/pyaggr3g470r/templates/home.html
@@ -8,7 +8,7 @@
<a href="/articles/{{ feed.id }}"><i class="glyphicon glyphicon-th-list"></i></a>
</div>
</div>
- {% for number in range(0, feed.articles[:10]|sort(attribute='date')|length-2, 3) %}
+ {% for number in range(0, feed.articles|sort(attribute='date')|length-2, 3) %}
<div class="row">
<div class="col-xs-6 col-sm-4 col-md-4">
{% if feed.articles[number].readed %}<h3>{% else %}<h1>{% endif %}
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 78e89633..27b1ab59 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -15,7 +15,7 @@ mail = Mail()
@app.route('/')
def home():
- feeds = models.Feed.objects().order_by('title')
+ feeds = models.Feed.objects().order_by('title').fields(slice__articles=[0,9])
return render_template('home.html', feeds=feeds)
@app.route('/fetch/', methods=['GET'])
bgstack15