put captcha and email confirmation back

master
James Sigurðarson 2016-07-12 15:30:36 +00:00
parent d8ce453476
commit 51330100d7
1 changed files with 6 additions and 6 deletions

12
app.py
View File

@ -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")