Compare commits

...

1 Commits

Author SHA1 Message Date
Tim Van Baak 424f9dc8da Add more logging 2021-02-18 19:17:43 -08:00
1 changed files with 7 additions and 3 deletions

View File

@ -105,9 +105,13 @@ def document(document_id):
@app.route('/login/', methods=['GET', 'POST'])
def login():
form = LoginForm()
if form.validate_on_submit() and check_password(current_app, form.password.data):
login_user(Admin())
return redirect(url_for('index'))
if form.validate_on_submit():
logger.debug('checking pw')
valid = check_password(current_app, form.password.data)
logging.debug('checked, got' + str(valid))
if valid:
login_user(Admin())
return redirect(url_for('index'))
return render_template('login.jinja', form=form)