mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-20 21:10:36 +00:00
Merge content into main package
This commit is contained in:
@ -20,25 +20,21 @@ def index():
|
||||
title='nopaque')
|
||||
|
||||
|
||||
@main.route('/about_and_faq')
|
||||
def about_and_faq():
|
||||
return render_template('main/about_and_faq.html.j2', title='About and faq')
|
||||
|
||||
|
||||
@main.route('/dashboard')
|
||||
@login_required
|
||||
def dashboard():
|
||||
return render_template('main/dashboard.html.j2', title='Dashboard')
|
||||
|
||||
|
||||
@main.route('/poster', methods=['GET', 'POST'])
|
||||
def poster():
|
||||
login_form = LoginForm(prefix='login-form')
|
||||
if login_form.validate_on_submit():
|
||||
user = User.query.filter_by(username=login_form.user.data).first()
|
||||
if user is None:
|
||||
user = User.query.filter_by(email=login_form.user.data).first()
|
||||
if user is not None and user.verify_password(login_form.password.data):
|
||||
login_user(user, login_form.remember_me.data)
|
||||
return redirect(url_for('main.dashboard'))
|
||||
flash('Invalid email/username or password.')
|
||||
return render_template('main/poster.html.j2', login_form=login_form,
|
||||
title='Poster')
|
||||
|
||||
@main.route('/news')
|
||||
def news():
|
||||
return render_template('main/news.html.j2', title='News')
|
||||
|
||||
|
||||
@main.route('/privacy_policy')
|
||||
@ -51,4 +47,5 @@ def privacy_policy():
|
||||
@main.route('/terms_of_use')
|
||||
def terms_of_use():
|
||||
return render_template('main/terms_of_use.html.j2',
|
||||
title='General Terms of Use of the platform nopaque') # noqa
|
||||
title='General Terms of Use of the platform '
|
||||
'nopaque')
|
||||
|
Reference in New Issue
Block a user