Commit 17d5b288 authored by fred's avatar fred

add logout link

parent f6c0d8a3
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
<h1><a href="{% url 'home' %}">Panik DB</a></h1> <h1><a href="{% url 'home' %}">Panik DB</a></h1>
</div> </div>
<div id="splash"> <div id="splash">
<div id="user-links">
{% block user-links %}
<a href="{% url 'logout' %}">Déconnexion</a>
{% endblock %}
</div>
</div> </div>
{% endif %} {% endif %}
<div id="content"> <div id="content">
......
{% extends "base.html" %} {% extends "base.html" %}
{% load url from future %} {% load url from future %}
{% block user-links %}{% endblock %}
{% block content %} {% block content %}
<h2>Connexion</h2> <h2>Connexion</h2>
......
...@@ -29,6 +29,7 @@ urlpatterns = patterns('', ...@@ -29,6 +29,7 @@ urlpatterns = patterns('',
url(r'^emissions/', url(r'^emissions/',
decorated_includes(login_required, include(emissions_urlpatterns))), decorated_includes(login_required, include(emissions_urlpatterns))),
url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login', name='logout'),
url(r'^accounts/', include('registration.backends.default.urls')), url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^admin/', include(admin.site.urls)), url(r'^admin/', include(admin.site.urls)),
......
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 to comment