aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views/views.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-11 14:22:44 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:31:06 +0200
commit01ccc02384a8b11d7ef33db2e13195d1e27bf850 (patch)
treeb999d392ebd5c2face8feb3aca1397aeac265794 /pyaggr3g470r/views/views.py
parentauto redirect to the all including filter when landing on no result (diff)
downloadnewspipe-01ccc02384a8b11d7ef33db2e13195d1e27bf850.tar.gz
newspipe-01ccc02384a8b11d7ef33db2e13195d1e27bf850.tar.bz2
newspipe-01ccc02384a8b11d7ef33db2e13195d1e27bf850.zip
removing unread page
Diffstat (limited to 'pyaggr3g470r/views/views.py')
-rw-r--r--pyaggr3g470r/views/views.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py
index fb2a5f87..ff33b576 100644
--- a/pyaggr3g470r/views/views.py
+++ b/pyaggr3g470r/views/views.py
@@ -363,24 +363,6 @@ def favorites():
nb_favorites += len(articles)
return render_template('favorites.html', feeds=result, nb_favorites=nb_favorites)
-@app.route('/unread/<int:feed_id>', methods=['GET'])
-@app.route('/unread', methods=['GET'])
-@login_required
-def unread(feed_id=None):
- """
- List unread articles.
- """
- if feed_id is not None:
- feeds_with_unread = Feed.query.filter(Feed.user_id == g.user.id, Feed.id == feed_id)
- else:
- feeds_with_unread = Feed.query.filter(Feed.user_id == g.user.id, Feed.articles.any(readed=False))
- result, nb_unread = [], 0
- light_feed = namedtuple('Feed', ['id', 'title', 'articles'], verbose=False, rename=False)
- for feed in feeds_with_unread:
- articles = Article.query.filter(Article.user_id == g.user.id, Article.feed_id == feed.id, Article.readed == False).all()
- result.append(light_feed(feed.id, feed.title, articles))
- nb_unread += len(articles)
- return render_template('unread.html', feeds=result, nb_unread=nb_unread)
@app.route('/inactives', methods=['GET'])
@login_required
bgstack15