First code commit

This commit is contained in:
Matt Wright
2012-03-08 16:03:53 -05:00
parent 6054e2fde4
commit f5db44d0a1
16 changed files with 811 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
{%- if current_user.is_authenticated() -%}
<p>Hello {{ current_user.email }}</p>
{%- endif %}
<ul>
<li><a href="{{ url_for('index') }}">Index</a></li>
<li><a href="{{ url_for('profile') }}">Profile</a></li>
{% if current_user.has_role('admin') -%}
<li><a href="{{ url_for('admin') }}">Admin</a></li>
{% endif -%}
{% if current_user.has_role('admin') or current_user.has_role('editor') -%}
<li><a href="{{ url_for('admin_or_editor') }}">Admin or Editor</a></li>
{% endif -%}
<li>
{%- if current_user.is_authenticated() -%}
<a href="{{ url_for('auth.logout') }}">Log out</a>
{%- else -%}
<a href="{{ url_for('login') }}">Log in</a>
{%- endif -%}
</li>
</ul>