|
|
@ -46,7 +46,7 @@ def logout(): |
|
|
|
@blueprint.route('/register/', methods=['GET', 'POST']) |
|
|
|
@blueprint.route('/register/', methods=['GET', 'POST']) |
|
|
|
def register(): |
|
|
|
def register(): |
|
|
|
"""Register new user.""" |
|
|
|
"""Register new user.""" |
|
|
|
form = RegisterForm(request.form, csrf_enabled=False) |
|
|
|
form = RegisterForm(request.form) |
|
|
|
if form.validate_on_submit(): |
|
|
|
if form.validate_on_submit(): |
|
|
|
User.create(username=form.username.data, email=form.email.data, password=form.password.data, active=True) |
|
|
|
User.create(username=form.username.data, email=form.email.data, password=form.password.data, active=True) |
|
|
|
flash('Thank you for registering. You can now log in.', 'success') |
|
|
|
flash('Thank you for registering. You can now log in.', 'success') |
|
|
|