diff --git a/app/routes.py b/app/routes.py index 8593cfa..d1af06f 100644 --- a/app/routes.py +++ b/app/routes.py @@ -31,7 +31,7 @@ def register(): @app.route('/login', methods=['GET', 'POST']) def login(): if current_user.is_authenticated: - return redirect(url_for('index')) + return redirect(url_for('admin')) form = LoginForm() if form.validate_on_submit(): user = User.query.filter_by(username=form.username.data).first() @@ -46,7 +46,7 @@ def login(): @app.route('/admin') @login_required def admin(): - return "Hello, World!" + return render_template('admin.html') @app.route('/logout') diff --git a/app/templates/admin.html b/app/templates/admin.html new file mode 100644 index 0000000..7e63a37 --- /dev/null +++ b/app/templates/admin.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +

Hi, {{ current_user.username }}!

+{% endblock %} \ No newline at end of file