diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-04 23:38:38 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-11-04 23:38:38 +0100 |
commit | 2b547cf7071ff640d748a402ab03d7aed94cd3c5 (patch) | |
tree | b114af6d170787602583434961cf5e478cd6d095 | |
parent | Mark all articles as read. (diff) | |
download | newspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.tar.gz newspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.tar.bz2 newspipe-2b547cf7071ff640d748a402ab03d7aed94cd3c5.zip |
Mark all articles as read + changed to the layout template.
-rw-r--r-- | pyaggr3g470r/views.py | 7 |
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): |