more normalization

This commit is contained in:
Patrick Jentsch
2023-03-28 14:19:37 +02:00
parent b41436c844
commit 9de09519d6
9 changed files with 72 additions and 46 deletions

View File

@ -60,8 +60,8 @@ def register():
return redirect(url_for('.login'))
return render_template(
'auth/register.html.j2',
form=form,
title='Register'
title='Register',
form=form
)
@ -81,7 +81,11 @@ def login():
flash('You have been logged in')
return redirect(next)
flash('Invalid email/username or password', category='error')
return render_template('auth/login.html.j2', form=form, title='Log in')
return render_template(
'auth/login.html.j2',
title='Log in',
form=form
)
@bp.route('/logout')
@ -98,7 +102,10 @@ def logout():
def unconfirmed():
if current_user.confirmed:
return redirect(url_for('main.dashboard'))
return render_template('auth/unconfirmed.html.j2', title='Unconfirmed')
return render_template(
'auth/unconfirmed.html.j2',
title='Unconfirmed'
)
@bp.route('/confirm-request')
@ -157,8 +164,8 @@ def reset_password_request():
return redirect(url_for('.login'))
return render_template(
'auth/reset_password_request.html.j2',
form=form,
title='Password Reset'
title='Password Reset',
form=form
)
@ -176,7 +183,7 @@ def reset_password(token):
return redirect(url_for('main.index'))
return render_template(
'auth/reset_password.html.j2',
form=form,
title='Password Reset',
form=form,
token=token
)