diff --git a/billard/templates/billard/base.html b/billard/templates/billard/base.html index 4e4b1da..c1abfef 100644 --- a/billard/templates/billard/base.html +++ b/billard/templates/billard/base.html @@ -27,9 +27,14 @@ diff --git a/caromserver/settings.py b/caromserver/settings.py index 62ac74a..fe18ef8 100644 --- a/caromserver/settings.py +++ b/caromserver/settings.py @@ -136,6 +136,7 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3' LOGIN_URL = 'login' LOGOUT_URL = 'logout' LOGIN_REDIRECT_URL = 'carom_index' +LOGOUT_REDIRECT_URL = 'carom_index' STATIC_ROOT = "/srv/carom/carom-server/static/" diff --git a/caromserver/urls.py b/caromserver/urls.py index 759677d..5aa52c1 100644 --- a/caromserver/urls.py +++ b/caromserver/urls.py @@ -15,12 +15,15 @@ Including another URLconf """ from django.conf.urls import url, include from django.contrib import admin +from django.contrib.auth import views as auth_views from django.views.generic import RedirectView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^billard/', include('billard.urls')), + url(r'^login/$', auth_views.login), + url(r'^logout/$', auth_views.logout), url(r'^', include('django.contrib.auth.urls')), url(r'^.*$', RedirectView.as_view(url='billard/', permanent=False), name='index') ]