Compare commits
1 Commits
5007a77675
...
27890ad7dc
Author | SHA1 | Date |
---|---|---|
Tim Van Baak | 27890ad7dc |
|
@ -105,7 +105,14 @@ def document(document_id):
|
||||||
@app.route('/login/', methods=['GET', 'POST'])
|
@app.route('/login/', methods=['GET', 'POST'])
|
||||||
def login():
|
def login():
|
||||||
form = LoginForm()
|
form = LoginForm()
|
||||||
if form.validate_on_submit() and check_password(current_app, form.password.data):
|
s = form.is_submitted()
|
||||||
|
logger.debug(f's={s}')
|
||||||
|
if s:
|
||||||
|
v = form.validate()
|
||||||
|
logger.debug(f'v={v}')
|
||||||
|
if v:
|
||||||
|
valid = check_password(current_app, form.password.data)
|
||||||
|
if valid:
|
||||||
login_user(Admin())
|
login_user(Admin())
|
||||||
return redirect(url_for('index'))
|
return redirect(url_for('index'))
|
||||||
return render_template('login.jinja', form=form)
|
return render_template('login.jinja', form=form)
|
||||||
|
|
Loading…
Reference in New Issue