From bb60a17f7bff315ef6b375f38d49d7200fb8f0c5 Mon Sep 17 00:00:00 2001 From: François Schmidts Date: Wed, 4 Mar 2015 00:01:45 +0100 Subject: adding refresh rate to the profile form --- pyaggr3g470r/views/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pyaggr3g470r/views') diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index d42d5db8..5279d7fe 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -554,7 +554,7 @@ def edit_feed(feed_id=None): """ Add or edit a feed. """ - feed = Feed.query.filter(Feed.id == feed_id).first() + feed = FeedController(g.user.id).get(id=feed_id) form = AddFeedForm() if request.method == 'POST': @@ -632,7 +632,9 @@ def profile(): if form.password.data != "": user.set_password(form.password.data) db.session.commit() - flash(gettext('User') + ' ' + user.nickname + ' ' + gettext('successfully updated.'), 'success') + flash("%s %s %s" % (gettext('User'), user.nickname, + gettext('successfully updated.')), + 'success') return redirect(url_for('profile')) else: return render_template('profile.html', form=form) -- cgit