diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-04-14 08:06:54 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-04-14 08:06:54 +0200 |
commit | ef6c92271c06615c0cab6caa3650e35e4233aa1e (patch) | |
tree | a7365738699afe55d115da167e9f9450b19dd9b8 | |
parent | It is now possible to sort articles by date (default) or by feed. (diff) | |
download | newspipe-ef6c92271c06615c0cab6caa3650e35e4233aa1e.tar.gz newspipe-ef6c92271c06615c0cab6caa3650e35e4233aa1e.tar.bz2 newspipe-ef6c92271c06615c0cab6caa3650e35e4233aa1e.zip |
Automatically download articles for the new feed.
-rw-r--r-- | pyaggr3g470r/views/feed.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py index af43d6f0..846df06d 100644 --- a/pyaggr3g470r/views/feed.py +++ b/pyaggr3g470r/views/feed.py @@ -134,8 +134,6 @@ def form(feed_id=None): if request.method == 'POST': if not form.validate(): - print(dir(form)) - print("oups") return render_template('edit_feed.html', form=form) existing_feeds = list(feed_contr.read(link=form.link.data)) if existing_feeds and feed_id is None: @@ -144,7 +142,6 @@ def form(feed_id=None): return redirect(url_for('feed.form', feed_id=existing_feeds[0].id)) # Edit an existing feed - print("new...") if feed_id is not None: feed_contr.update({'id': feed_id}, {'title': form.title.data, @@ -156,7 +153,6 @@ def form(feed_id=None): return redirect(url_for('feed.form', feed_id=feed_id)) # Create a new feed - print("new feed") new_feed = FeedController(g.user.id).create( title=form.title.data, description="", @@ -167,6 +163,9 @@ def form(feed_id=None): flash(gettext('Feed %(feed_title)r successfully created.', feed_title=new_feed.title), 'success') + utils.fetch(g.user.id, new_feed.id) + flash(gettext("Downloading articles for the new feed..."), 'info') + return redirect(url_for('feed.form', feed_id=new_feed.id)) |