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