Beispiel #1
0
def reset_errors(feed_id):
    feed_contr = FeedController(current_user.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",
    )
    return redirect(request.referrer or url_for("home"))
Beispiel #2
0
def delete(feed_id=None):
    feed_contr = FeedController(current_user.id)
    feed = feed_contr.get(id=feed_id)
    feed_contr.delete(feed_id)
    flash(
        gettext("Feed %(feed_title)s successfully deleted.",
                feed_title=feed.title),
        "success",
    )
    return redirect(url_for("home"))