aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-28 14:50:14 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2013-12-28 14:50:14 +0100
commite61a190360d3bd26d6dfe177f425d3051e508249 (patch)
tree5239a9ad4c70b3f0bcbb1ba4163b3a6341f6bce6 /pyaggr3g470r
parentReleased version 4.4. (diff)
downloadnewspipe-e61a190360d3bd26d6dfe177f425d3051e508249.tar.gz
newspipe-e61a190360d3bd26d6dfe177f425d3051e508249.tar.bz2
newspipe-e61a190360d3bd26d6dfe177f425d3051e508249.zip
Added comments.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/views.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index 42854512..d9fb7470 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -215,6 +215,9 @@ def articles(feed_id=None):
@app.route('/favorites/', methods=['GET'])
@login_required
def favorites():
+ """
+ List favorites articles.
+ """
user = models.User.objects(email=g.user.email).first()
result = []
for feed in user.feeds:
@@ -226,6 +229,9 @@ def favorites():
@app.route('/unread/', methods=['GET'])
@login_required
def unread():
+ """
+ List unread articles.
+ """
user = models.User.objects(email=g.user.email).first()
result = []
for feed in user.feeds:
@@ -281,6 +287,9 @@ def export_articles():
@app.route('/search/', methods=['GET'])
@login_required
def search():
+ """
+ Search articles corresponding to the query.
+ """
user = models.User.objects(email=g.user.email).first()
result = []
query = request.args.get('query', None)
@@ -300,6 +309,9 @@ def search():
@app.route('/management/', methods=['GET'])
@login_required
def management():
+ """
+ Display the management page.
+ """
form = AddFeedForm()
user = models.User.objects(email=g.user.email).first()
nb_feeds = len(user.feeds)
@@ -366,6 +378,9 @@ def edit_feed(feed_id=None):
@app.route('/delete_feed/<feed_id>', methods=['GET'])
@login_required
def delete_feed(feed_id=None):
+ """
+ Delete a feed with all associated articles.
+ """
user = models.User.objects(email=g.user.email).first()
# delete all articles (Document objects) of the feed
for feed in user.feeds:
bgstack15