aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-04-08 15:53:39 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2015-04-12 14:31:06 +0200
commita4d30ad7b4481fe68e37d01a2c0b289445cf27a2 (patch)
treeea0657b2ab09c3cad518fb3f5a0170426cd94d7f
parentgetting things out of the view a little more (diff)
downloadnewspipe-a4d30ad7b4481fe68e37d01a2c0b289445cf27a2.tar.gz
newspipe-a4d30ad7b4481fe68e37d01a2c0b289445cf27a2.tar.bz2
newspipe-a4d30ad7b4481fe68e37d01a2c0b289445cf27a2.zip
adding a reset link to the feed page
-rw-r--r--pyaggr3g470r/templates/feed.html1
-rw-r--r--pyaggr3g470r/views/feed.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/pyaggr3g470r/templates/feed.html b/pyaggr3g470r/templates/feed.html
index c0c92279..c888e04f 100644
--- a/pyaggr3g470r/templates/feed.html
+++ b/pyaggr3g470r/templates/feed.html
@@ -23,6 +23,7 @@
{% if feed.error_count > 2 %}
<b>{{ _("That feed has encountered too much consecutive errors and won't be retrieved anymore.") }}</b><br />
+ {{ _("You can click <a href='%(reset_error_url)s'>here</a> to reset the error count and reactivate the feed.", reset_error_url=url_for("feed.reset_errors", feed_id=feed.id)) }}
{% elif feed.error_count > 0 %}
{{ _("The download of this feed has encountered some problems. However its error counter will be reinitialized at the next successful retrieving.") }}<br />
{% endif %}
diff --git a/pyaggr3g470r/views/feed.py b/pyaggr3g470r/views/feed.py
index 9d74fa75..895584a4 100644
--- a/pyaggr3g470r/views/feed.py
+++ b/pyaggr3g470r/views/feed.py
@@ -75,7 +75,7 @@ def delete(feed_id=None):
@login_required
def reset_errors(feed_id):
feed_contr = FeedController(g.user.id)
- feed = feed_contr.get(feed_id)
+ feed = feed_contr.get(id=feed_id)
feed_contr.update({'id': feed_id}, {'error_count': 0, 'last_error': ''})
flash(gettext('Feed %(feed_title)r successfully updated.',
feed_title=feed.title), 'success')
bgstack15