'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django_cas.middleware.CASMiddleware',
+ 'django_cas_ng.middleware.CASMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
- 'django_cas.backends.CASBackend',
+ 'django_cas_ng.backends.CASBackend',
)
ROOT_URLCONF = 'audiobooks.urls'
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'bootstrap4',
+ 'django_cas_ng',
'apiclient',
'archive',
}
CAS_SERVER_URL = "https://logowanie.nowoczesnapolska.org.pl/cas/"
-CAS_VERSION = "1"
+CAS_VERSION = "2"
EMAIL_SUBJECT_PREFIX = '[Audio] '
SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl'
from django.conf import settings
from django.conf.urls import include, url
from django.views.generic import RedirectView
-import django_cas.views
+import django_cas_ng.views
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
url(r'^publish/', include('apiclient.urls')),
url(r'^admin/', include(admin.site.urls)),
- url(r'^accounts/login/$', django_cas.views.login, name='login'),
- url(r'^accounts/logout/$', django_cas.views.logout, name='logout'),
+ url(r'^accounts/login/$', django_cas_ng.views.LoginView.as_view(), name='login'),
+ url(r'^accounts/logout/$', django_cas_ng.views.LogoutView.as_view(), name='logout'),
]