Compare commits
1 Commits
424f9dc8da
...
c629b2d7d7
Author | SHA1 | Date |
---|---|---|
Tim Van Baak | c629b2d7d7 |
|
@ -105,9 +105,14 @@ def document(document_id):
|
|||
@app.route('/login/', methods=['GET', 'POST'])
|
||||
def login():
|
||||
form = LoginForm()
|
||||
if form.validate_on_submit() and check_password(current_app, form.password.data):
|
||||
login_user(Admin())
|
||||
return redirect(url_for('index'))
|
||||
logger.debug('valid ' + str(form.validate()) + ' submi ' + str(form.is_submitted()))
|
||||
if form.validate_on_submit():
|
||||
logger.debug('checking pw')
|
||||
valid = check_password(current_app, form.password.data)
|
||||
logging.debug('checked, got' + str(valid))
|
||||
if valid:
|
||||
login_user(Admin())
|
||||
return redirect(url_for('index'))
|
||||
return render_template('login.jinja', form=form)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue