From 51330100d7cbda1cd703d258a8e0d59f64afd7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?James=20Sigur=C3=B0arson?= Date: Tue, 12 Jul 2016 15:30:36 +0000 Subject: [PATCH] put captcha and email confirmation back --- app.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 9fd8e71..a2622e1 100644 --- a/app.py +++ b/app.py @@ -109,10 +109,10 @@ def register(): if request.method == "GET": return render_template("register.html") elif request.method == "POST": - # error, message = captcha.verify_captcha() - # if error: - # flash(message) - # return render_template("register.html") + error, message = captcha.verify_captcha() + if error: + flash(message) + return render_template("register.html") username = request.form["username"].strip() user_email = request.form["email"].strip() @@ -196,9 +196,9 @@ def register(): user.setPassword(password) user.save() - print(confirmation_key) + # print(confirmation_key) - # email.send_confirmation_email(user_email, confirmation_key) + email.send_confirmation_email(user_email, confirmation_key) session["user_id"] = user.id flash("Registration finished")