X-Git-Url: https://git.mdrn.pl/cas.git/blobdiff_plain/78320dfdc127b300174a88316718a058305f629a..1c1998bd8961dbe721b9e133811678c92fd3c685:/src/cas/settings.py?ds=sidebyside diff --git a/src/cas/settings.py b/src/cas/settings.py index 562111c..a4c4137 100644 --- a/src/cas/settings.py +++ b/src/cas/settings.py @@ -4,7 +4,6 @@ from os import path PROJECT_ROOT = path.realpath(path.dirname(__file__)) DEBUG = True -TEMPLATE_DEBUG = DEBUG ADMINS = [ ] @@ -57,9 +56,28 @@ STATICFILES_DIRS = [ ROOT_URLCONF = 'cas.urls' -TEMPLATE_DIRS = ( - PROJECT_ROOT + '/templates', -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [ + PROJECT_ROOT + '/templates', + ], + 'OPTIONS': { + 'context_processors': [ + "django.contrib.auth.context_processors.auth", + "django.template.context_processors.debug", + "django.template.context_processors.i18n", + "django.template.context_processors.media", + "django.template.context_processors.static", + "django.template.context_processors.tz", + "django.contrib.messages.context_processors.messages", + "django.template.context_processors.request", + ], + 'debug': DEBUG, + }, + }, +] LOCALE_PATHS = ( PROJECT_ROOT + '/locale', @@ -85,21 +103,11 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.debug", - "django.core.context_processors.i18n", - "django.core.context_processors.media", - "django.core.context_processors.static", - "django.core.context_processors.tz", - "django.contrib.messages.context_processors.messages", - "django.core.context_processors.request", -) - # django-cas-provider settings LOGIN_URL = '/cas/login/' LOGOUT_URL = '/cas/logout/'