Django 1.5
[audio.git] / audiobooks / settings.py
index 1df2c37..3f92da0 100644 (file)
@@ -105,9 +105,15 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.sessions.middleware.SessionMiddleware',
     'django.middleware.csrf.CsrfViewMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django_cas.middleware.CASMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
 )
 
+AUTHENTICATION_BACKENDS = (
+    'django.contrib.auth.backends.ModelBackend',
+    'django_cas.backends.CASBackend',
+)
+
 ROOT_URLCONF = 'audiobooks.urls'
 
 TEMPLATE_DIRS = (
@@ -143,9 +149,15 @@ INSTALLED_APPS = (
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
+    'filters': {
+         'require_debug_false': {
+             '()': 'django.utils.log.RequireDebugFalse'
+         }
+     },
     'handlers': {
         'mail_admins': {
             'level': 'ERROR',
+            'filters': ['require_debug_false'],
             'class': 'django.utils.log.AdminEmailHandler'
         }
     },
@@ -158,6 +170,10 @@ LOGGING = {
     }
 }
 
+#http://logowanie.nowoczesnapolska.org.pl/cas/'
+CAS_SERVER_URL = "http://logowanie.nowoczesnapolska.org.pl/cas/"
+CAS_VERSION = "1"
+
 
 EMAIL_SUBJECT_PREFIX = '[Audio] '
 SERVER_EMAIL = 'no-reply@audio.wolnelektury.pl'