diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2013-12-27 15:23:29 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2013-12-27 15:23:29 +0100 |
commit | 24c7d3feff492fa77a0f1115635d43da2144e3d3 (patch) | |
tree | 76083d5c24e084ed60420601618d5ced312f6f9f | |
parent | Improved Flask flash messages. (diff) | |
download | newspipe-24c7d3feff492fa77a0f1115635d43da2144e3d3.tar.gz newspipe-24c7d3feff492fa77a0f1115635d43da2144e3d3.tar.bz2 newspipe-24c7d3feff492fa77a0f1115635d43da2144e3d3.zip |
Feed deleteion confirmation.
-rw-r--r-- | pyaggr3g470r/views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 00d01c5a..6b069ae3 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -367,7 +367,7 @@ def edit_feed(feed_id=None): @login_required def delete_feed(feed_id=None): user = models.User.objects(email=g.user.email).first() - # delete all articles (Document objects) + # delete all articles (Document objects) of the feed for feed in user.feeds: if str(feed.oid) == feed_id: for article in feed.articles: @@ -376,7 +376,8 @@ def delete_feed(feed_id=None): # delete the feed (EmbeddedDocument object) user.feeds.remove(feed) user.save() - return redirect(url_for('home')) + flash('Feed "' + feed.title + '" successfully deleted.', 'success') + return redirect(url_for('home')) @app.route('/profile/', methods=['GET', 'POST']) @login_required |