aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-11-04 23:38:38 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-11-04 23:38:38 +0100
commit2b547cf7071ff640d748a402ab03d7aed94cd3c5 (patch)
treeb114af6d170787602583434961cf5e478cd6d095 /pyaggr3g470r/views.py
parentMark all articles as read. (diff)
downloadnewspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.tar.gz
newspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.tar.bz2
newspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.zip
Mark all articles as read + changed to the layout template.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 166c61e6..57fa4956 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -113,6 +113,13 @@ def article(article_id=None):
article.save()
return render_template('article.html', article=article)
+@app.route('/mark_as_read/', methods=['GET'])
+@login_required
+def mark_as_read():
+ #user = models.User.objects(email=g.user.email).first()
+ models.Article.objects(readed=False).update(set__readed=True)
+ return redirect(url_for('home'))
+
@app.route('/delete/<article_id>', methods=['GET'])
@login_required
def delete(article_id=None):
bgstack15