'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django_cas.middleware.CASMiddleware',
'django.middleware.doc.XViewMiddleware',
'pagination.middleware.PaginationMiddleware',
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
+ 'django_cas.backends.CASBackend',
)
ROOT_URLCONF = 'redakcja.urls'
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')),