Compare commits

..

1 Commits

Author SHA1 Message Date
Tim Van Baak c629b2d7d7 Add more logging 2021-02-18 19:31:37 -08:00
1 changed files with 8 additions and 10 deletions

View File

@ -105,13 +105,11 @@ def document(document_id):
@app.route('/login/', methods=['GET', 'POST']) @app.route('/login/', methods=['GET', 'POST'])
def login(): def login():
form = LoginForm() form = LoginForm()
s = form.is_submitted() logger.debug('valid ' + str(form.validate()) + ' submi ' + str(form.is_submitted()))
logger.debug(f's={s}') if form.validate_on_submit():
if s: logger.debug('checking pw')
v = form.validate()
logger.debug(f'v={v}')
if v:
valid = check_password(current_app, form.password.data) valid = check_password(current_app, form.password.data)
logging.debug('checked, got' + str(valid))
if valid: if valid:
login_user(Admin()) login_user(Admin())
return redirect(url_for('index')) return redirect(url_for('index'))