Commit f712819a by Őry Máté

dashboard: add logout link+view

parent c74c6714
......@@ -2,7 +2,7 @@ from django.conf.urls import patterns, include, url
# from django.views.generic import TemplateView
from django.contrib import admin
from django.contrib.auth.views import login
from django.contrib.auth.views import login, logout
......@@ -20,5 +20,6 @@ urlpatterns = patterns(
url(r'^network/', include('network.urls')),
url(r'^dashboard/', include('dashboard.urls')),
url(r'^login/', login),
url(r'^logout/', logout),
url(r'^vm-api/', include('vm.urls')),
......@@ -27,7 +27,11 @@
<!-- temporarily -->
<a class="navbar-brand pull-right" href="/network/" style="color: white; font-size: 10px;">Network</a>
<a class="navbar-brand pull-right" href="/admin/" style="color: white; font-size: 10px;">Admin</a>
{% if user.is_authenticated %}
<a class="navbar-brand pull-right" href="/logout/?next=/login/" style="color: white; font-size: 10px;">Log out {{user}}</a>
{% else %}
<a class="navbar-brand pull-right" href="/login/?next={% url "dashboard.index" %}" style="color: white; font-size: 10px;">Login</a>
{% endif %}
<div class="container">
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment