Commit 84152f8c by Őry Máté

circle: use django.contrib.auth.urls

parent f712819a
...@@ -2,7 +2,6 @@ from django.conf.urls import patterns, include, url ...@@ -2,7 +2,6 @@ from django.conf.urls import patterns, include, url
# from django.views.generic import TemplateView # from django.views.generic import TemplateView
from django.contrib import admin from django.contrib import admin
from django.contrib.auth.views import login, logout
admin.autodiscover() admin.autodiscover()
...@@ -19,7 +18,6 @@ urlpatterns = patterns( ...@@ -19,7 +18,6 @@ urlpatterns = patterns(
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
url(r'^network/', include('network.urls')), url(r'^network/', include('network.urls')),
url(r'^dashboard/', include('dashboard.urls')), url(r'^dashboard/', include('dashboard.urls')),
url(r'^login/', login), url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^logout/', logout),
url(r'^vm-api/', include('vm.urls')), url(r'^vm-api/', include('vm.urls')),
) )
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
<a class="navbar-brand pull-right" href="/network/" style="color: white; font-size: 10px;">Network</a> <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> <a class="navbar-brand pull-right" href="/admin/" style="color: white; font-size: 10px;">Admin</a>
{% if user.is_authenticated %} {% if user.is_authenticated %}
<a class="navbar-brand pull-right" href="/logout/?next=/login/" style="color: white; font-size: 10px;">Log out {{user}}</a> <a class="navbar-brand pull-right" href="{% url "logout" %}?next={% url "login" %}" style="color: white; font-size: 10px;">Log out {{user}}</a>
{% else %} {% else %}
<a class="navbar-brand pull-right" href="/login/?next={% url "dashboard.index" %}" style="color: white; font-size: 10px;">Login</a> <a class="navbar-brand pull-right" href="{% url "login" %}?next={% url "dashboard.index" %}" style="color: white; font-size: 10px;">Login</a>
{% endif %} {% endif %}
</div> </div>
......
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