Add Django 1.10 support
This commit is contained in:
@ -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 = [
|
||||
{
|
||||
|
Reference in New Issue
Block a user