From 7119c98bdf164dd5c964ec8c8aaa424b695ff8da Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 23 May 2014 10:39:33 +0200 Subject: When form is not validated, redirect to create_user. --- pyaggr3g470r/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py index 4f5c4fb2..f73ba812 100644 --- a/pyaggr3g470r/views.py +++ b/pyaggr3g470r/views.py @@ -743,7 +743,7 @@ def create_user(user_id=None): flash(gettext('User') + ' ' + user.nickname + ' ' + gettext('successfully created.'), 'success') return redirect("/admin/edit_user/"+str(user.id)+"/") else: - return render_template('profile.html', form=form) + return redirect(url_for('create_user')) if request.method == 'GET': if user_id is not None: -- cgit