Compare commits
1 Commits
c629b2d7d7
...
27890ad7dc
Author | SHA1 | Date |
---|---|---|
Tim Van Baak | 27890ad7dc |
|
@ -105,11 +105,13 @@ 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:
|
||||||
|
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'))
|
||||||
|
|
Loading…
Reference in New Issue