From e50e97b4282d4b3116d2f46537da24a9e411a329 Mon Sep 17 00:00:00 2001 From: Feliciaan De Palmenaer Date: Fri, 5 Jun 2015 11:39:34 +0200 Subject: [PATCH] Add initial profile --- app/templates/layout.html | 2 +- app/templates/profile.html | 6 ++++++ app/views/__init__.py | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 app/templates/profile.html diff --git a/app/templates/layout.html b/app/templates/layout.html index c35e6a5..3baedf4 100644 --- a/app/templates/layout.html +++ b/app/templates/layout.html @@ -54,7 +54,7 @@ {% if current_user.is_anonymous() %}
  • Login
  • {% else %} -
  • {{ current_user.username }}
  • +
  • {{ current_user.username }}
  • Logout
  • {% endif %} diff --git a/app/templates/profile.html b/app/templates/profile.html new file mode 100644 index 0000000..09a5891 --- /dev/null +++ b/app/templates/profile.html @@ -0,0 +1,6 @@ +{% extends "layout.html" -%} +{% set active_page = "profile" -%} + +{% block container %} +

    {{ current_user.username }}

    +{% endblock %} diff --git a/app/views/__init__.py b/app/views/__init__.py index 0a668fd..911b392 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -26,6 +26,11 @@ def about(): def stats(): return render_template('stats.html') +@app.route('/profile/') +@login_required +def profile(): + return render_template('profile.html') + if app.debug: # add route information @app.route('/routes')