Commit f86d4de4 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

dashboard and settings panes added

parent 2c6c55f4
...@@ -32,6 +32,14 @@ ...@@ -32,6 +32,14 @@
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><a href="/logout">Logout</a></li> <li><a href="/logout">Logout</a></li>
</ul> </ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="/settings">Settings</a></li>
</ul>
{% endif %}
{% if session['role'] == 'admin' %}
<ul class="nav navbar-nav navbar-right">
<li><a href="/dashboard">Dashboard</a></li>
</ul>
{% endif %} {% endif %}
</div><!--/.nav-collapse --> </div><!--/.nav-collapse -->
</div> </div>
......
...@@ -81,6 +81,7 @@ def login(): ...@@ -81,6 +81,7 @@ def login():
return redirect(request.url) return redirect(request.url)
else: else:
session['name'] = username session['name'] = username
session['role'] = res[1][2]
return redirect(url_for('index')) return redirect(url_for('index'))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment