Add initial profile

This commit is contained in:
Feliciaan De Palmenaer 2015-06-05 11:39:34 +02:00
parent feb1bb0b69
commit e50e97b428
3 changed files with 12 additions and 1 deletions

View file

@ -54,7 +54,7 @@
{% if current_user.is_anonymous() %} {% if current_user.is_anonymous() %}
<li><a href="{{ url_for('login') }}">Login</a></li> <li><a href="{{ url_for('login') }}">Login</a></li>
{% else %} {% else %}
<li><a href="#">{{ current_user.username }}</a></li> <li><a href="{{ url_for('profile') }}">{{ current_user.username }}</a></li>
<li><a href="{{ url_for('logout') }}">Logout</a></li> <li><a href="{{ url_for('logout') }}">Logout</a></li>
{% endif %} {% endif %}
</ul> </ul>

View file

@ -0,0 +1,6 @@
{% extends "layout.html" -%}
{% set active_page = "profile" -%}
{% block container %}
<h1>{{ current_user.username }}</h1>
{% endblock %}

View file

@ -26,6 +26,11 @@ def about():
def stats(): def stats():
return render_template('stats.html') return render_template('stats.html')
@app.route('/profile/')
@login_required
def profile():
return render_template('profile.html')
if app.debug: # add route information if app.debug: # add route information
@app.route('/routes') @app.route('/routes')