From: Radek Czajka Date: Wed, 21 Sep 2011 14:48:28 +0000 (+0200) Subject: use cas X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/ce008e109128c2a5e703947e9b7c40eabcc96e11?ds=sidebyside use cas --- diff --git a/redakcja/settings/common.py b/redakcja/settings/common.py index 9ff3805c..9d6e175e 100644 --- a/redakcja/settings/common.py +++ b/redakcja/settings/common.py @@ -81,6 +81,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django_cas.middleware.CASMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware', @@ -89,6 +90,7 @@ MIDDLEWARE_CLASSES = ( AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', + 'django_cas.backends.CASBackend', ) ROOT_URLCONF = 'redakcja.urls' diff --git a/redakcja/urls.py b/redakcja/urls.py index 1d76ee80..4aedf58f 100644 --- a/redakcja/urls.py +++ b/redakcja/urls.py @@ -9,8 +9,11 @@ admin.autodiscover() urlpatterns = patterns('', # Auth - url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'), - url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'), + #url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'), + #url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'), + + url(r'^accounts/login/$', 'django_cas.views.login', name='login'), + url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'), # Admin panel (r'^admin/filebrowser/', include('filebrowser.urls')),