Commit e106826b authored by Ale's avatar Ale

feat: Add logout link

parent d06f0c31
......@@ -25,6 +25,8 @@ MEDIA_URL = '/media/'
PROJECT_ADMIN_APPS = []
LOGOUT_REDIRECT_URL = '/'
DJANGO_APPS = [
'django.contrib.admin',
'django.contrib.auth',
......
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
\ No newline at end of file
......@@ -24,5 +24,12 @@
<img src="{% static 'site/img/icons/facebook.svg' %}" />
</a>
</li>
{% if request.user.is_staff %}
<li class="menu-social__item">
<a href="{% url 'logout' %}">
<img src="{% static 'site/img/icons/log-out.svg' %}" />
</a>
</li>
{% endif %}
</ul>
</div>
......@@ -9,6 +9,8 @@ from django.conf import settings
from apps.connectors import urls as webhooks
from apps.api import urls as api
from apps.map.views import Map
from django.contrib.auth.views import LogoutView
from django.conf import settings
urlpatterns = [
# admin
......@@ -16,7 +18,12 @@ urlpatterns = [
'admin/',
admin.site.urls
),
path(
'logout',
LogoutView.as_view(),
{ 'next_page': settings.LOGOUT_REDIRECT_URL },
name='logout'
),
# CKEditor
path(
'ckeditor/',
......
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