Make the about page the index page.

This commit is contained in:
Patrick Jentsch
2019-08-02 13:24:52 +02:00
parent d6f60e4267
commit e327f0c8bf
4 changed files with 14 additions and 17 deletions

View File

@ -10,7 +10,12 @@ import hashlib
import os
@main.route('/', methods=['GET', 'POST'])
@main.route('/')
def index():
return render_template('main/index.html.j2', title='Opaque')
@main.route('/dashboard', methods=['GET', 'POST'])
@login_required
def dashboard():
create_corpus_form = CreateCorpusForm()
@ -44,18 +49,10 @@ def dashboard():
)
@main.route('/about')
def about():
return render_template('main/about.html.j2', title='About')
@main.route('/admin', methods=['GET', 'POST'])
@login_required
@admin_required
def for_admins_only():
"""
View for admin page only accesible by admins.
"""
users = User.query.order_by(User.username).all()
items = [AdminUserItem(u.username, u.email, u.role_id, u.confirmed) for u in users]
table = AdminUserTable(items)