Compare commits
1 Commits
27890ad7dc
...
c629b2d7d7
Author | SHA1 | Date |
---|---|---|
Tim Van Baak | c629b2d7d7 |
|
@ -105,16 +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()
|
||||||
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()
|
valid = check_password(current_app, form.password.data)
|
||||||
logger.debug(f'v={v}')
|
logging.debug('checked, got' + str(valid))
|
||||||
if v:
|
if valid:
|
||||||
valid = check_password(current_app, form.password.data)
|
login_user(Admin())
|
||||||
if valid:
|
return redirect(url_for('index'))
|
||||||
login_user(Admin())
|
|
||||||
return redirect(url_for('index'))
|
|
||||||
return render_template('login.jinja', form=form)
|
return render_template('login.jinja', form=form)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue