Add initial profile
This commit is contained in:
parent
feb1bb0b69
commit
e50e97b428
3 changed files with 12 additions and 1 deletions
|
@ -54,7 +54,7 @@
|
|||
{% if current_user.is_anonymous() %}
|
||||
<li><a href="{{ url_for('login') }}">Login</a></li>
|
||||
{% 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>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
6
app/templates/profile.html
Normal file
6
app/templates/profile.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" -%}
|
||||
{% set active_page = "profile" -%}
|
||||
|
||||
{% block container %}
|
||||
<h1>{{ current_user.username }}</h1>
|
||||
{% endblock %}
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue