Add Django 1.10 support

This commit is contained in:
Valentin Samir
2016-08-25 13:02:09 +02:00
parent 0c8a90e48f
commit 94c2168af1
8 changed files with 44 additions and 5 deletions

View File

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
import django
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@ -40,7 +41,7 @@ INSTALLED_APPS = [
'cas_server',
]
MIDDLEWARE_CLASSES = [
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@ -50,6 +51,8 @@ MIDDLEWARE_CLASSES = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.locale.LocaleMiddleware',
]
if django.VERSION < (1, 10):
MIDDLEWARE_CLASSES = MIDDLEWARE
TEMPLATES = [
{