use cas
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Sep 2011 14:48:28 +0000 (16:48 +0200)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Wed, 21 Sep 2011 14:48:28 +0000 (16:48 +0200)
redakcja/settings/common.py
redakcja/urls.py

index 9ff3805..9d6e175 100644 (file)
@@ -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'
index 1d76ee8..4aedf58 100644 (file)
@@ -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')),