aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 12:37:17 +0200
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-10-13 12:37:17 +0200
commit9fdc9836902f0b1bb8cd9f087cdd238b2e96c6de (patch)
tree8adb38c1f58f2e311c6bde220d2344f63e053451 /pyaggr3g470r/views.py
parentFirst prototype for the /articles page. (diff)
downloadnewspipe-9fdc9836902f0b1bb8cd9f087cdd238b2e96c6de.tar.gz
newspipe-9fdc9836902f0b1bb8cd9f087cdd238b2e96c6de.tar.bz2
newspipe-9fdc9836902f0b1bb8cd9f087cdd238b2e96c6de.zip
Mark an article as read.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index b4f93ddf..78e89633 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -41,6 +41,9 @@ def feed(feed_id=None):
@app.route('/article/<article_id>', methods=['GET'])
def article(article_id=None):
article = models.Article.objects(id=article_id).first()
+ if not article.readed:
+ article.readed = True
+ article.save()
return render_template('article.html', article=article)
@app.route('/articles/<feed_id>', methods=['GET'])
bgstack15