Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
f86d4de4
Commit
f86d4de4
authored
Apr 23, 2020
by
Vladislav Rykov
Browse files
dashboard and settings panes added
parent
2c6c55f4
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/app/__pycache__/views.cpython-35.pyc
View file @
f86d4de4
No preview for this file type
app/app/templates/layout.html
View file @
f86d4de4
...
...
@@ -32,6 +32,14 @@
<ul
class=
"nav navbar-nav navbar-right"
>
<li><a
href=
"/logout"
>
Logout
</a></li>
</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 %}
</div>
<!--/.nav-collapse -->
</div>
...
...
app/app/views.py
View file @
f86d4de4
...
...
@@ -81,6 +81,7 @@ def login():
return
redirect
(
request
.
url
)
else
:
session
[
'name'
]
=
username
session
[
'role'
]
=
res
[
1
][
2
]
return
redirect
(
url_for
(
'index'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment