Compare commits

..

1 Commits

Author SHA1 Message Date
Tim Van Baak 27890ad7dc Add more logging 2021-02-18 20:05:17 -08:00
1 changed files with 10 additions and 8 deletions

View File

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