aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-11-01 09:11:56 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-11-01 09:11:56 +0100
commit9d5d75023a0fba5021f82e478f71684a866554e6 (patch)
tree6c7ce6ab42441f1174c7ad57b36cff3f120b70d7 /pyaggr3g470r
parentImproved templates: rendering of the list of articles (diff)
downloadnewspipe-9d5d75023a0fba5021f82e478f71684a866554e6.tar.gz
newspipe-9d5d75023a0fba5021f82e478f71684a866554e6.tar.bz2
newspipe-9d5d75023a0fba5021f82e478f71684a866554e6.zip
Management page has been updated.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/templates/management.html4
-rw-r--r--pyaggr3g470r/views.py6
2 files changed, 6 insertions, 4 deletions
diff --git a/pyaggr3g470r/templates/management.html b/pyaggr3g470r/templates/management.html
index a50d16fb..65b589f8 100644
--- a/pyaggr3g470r/templates/management.html
+++ b/pyaggr3g470r/templates/management.html
@@ -3,12 +3,12 @@
<div class="container">
<div class="jumbotron">
<h1>Subscriptions</h1>
-
+ <p>You are subscribed to {{ nb_feeds }} <a href="/feeds">feeds</a>.</p>
</div>
<div class="jumbotron">
<h1>Database</h1>
- <p>{{ nb_article }} articles are stored in the database.</p>
+ <p>{{ nb_articles }} articles are stored in the database with {{ nb_unread_articles }} <a href="/unread/">unread articles</a>.</p>
</div>
</div><!-- /.container -->
{% endblock %} \ No newline at end of file
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index fa406fe9..ae10a5a9 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -151,5 +151,7 @@ def unread():
@app.route('/management/', methods=['GET'])
@login_required
def management():
- nb_article = models.Article.objects().count()
- return render_template('management.html', nb_article=nb_article) \ No newline at end of file
+ nb_feeds = models.Feed.objects().count()
+ nb_articles = models.Article.objects().count()
+ nb_unread_articles = models.Article.objects(readed=False).count()
+ return render_template('management.html', nb_feeds=nb_feeds, nb_articles=nb_articles, nb_unread_articles=nb_unread_articles) \ No newline at end of file
bgstack15