aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-01 22:50:18 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-05-01 22:50:18 +0200
commit43e21e5c464302971677d8eaa8da79c76c4a418b (patch)
tree2344acbb60c2dd51d410af01e553dde6a44556d0 /src
parentFixed a translation. (diff)
downloadnewspipe-43e21e5c464302971677d8eaa8da79c76c4a418b.tar.gz
newspipe-43e21e5c464302971677d8eaa8da79c76c4a418b.tar.bz2
newspipe-43e21e5c464302971677d8eaa8da79c76c4a418b.zip
Fixed a problem in a flash message.
Diffstat (limited to 'src')
-rw-r--r--src/web/views/admin.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/web/views/admin.py b/src/web/views/admin.py
index 3db08cd9..d7ec211f 100644
--- a/src/web/views/admin.py
+++ b/src/web/views/admin.py
@@ -70,11 +70,11 @@ def process_user_form(user_id=None):
else:
# Create a new user (by the admin)
user = user_contr.create(nickname=form.nickname.data,
- email=form.email.data,
- pwdhash=generate_password_hash(form.password.data),
- is_admin=False,
- is_active=True,
- refresh_rate=form.refresh_rate.data)
+ email=form.email.data,
+ pwdhash=generate_password_hash(form.password.data),
+ is_admin=False,
+ is_active=True,
+ refresh_rate=form.refresh_rate.data)
flash(gettext('User %(nick)s successfully created',
nick=user.nickname), 'success')
return redirect(url_for('admin.user_form', user_id=user.id))
@@ -92,8 +92,9 @@ def delete_user(user_id=None):
flash(gettext('User %(nick)s successfully deleted',
nick=user.nickname), 'success')
except Exception as error:
- flash(gettext('An error occured while trying to delete a user: '
- '%(error)', error=error), 'danger')
+ flash(
+ gettext('An error occured while trying to delete a user: %(error)s',
+ error=error), 'danger')
return redirect(redirect_url())
bgstack15