diff --git a/.travis.yml b/.travis.yml index b04555b..d05aa93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ env: - DJANGO_VERSION=1.7 - DJANGO_VERSION=1.8 - DJANGO_VERSION=1.9 + - DJANGO_VERSION=1.10 install: - pip install -q Django==$DJANGO_VERSION script: diff --git a/example/settings.py b/example/settings.py index 988bbe5..328b728 100644 --- a/example/settings.py +++ b/example/settings.py @@ -83,14 +83,7 @@ # Make this unique, and don't share it with anybody. SECRET_KEY = 'sq9c#o&a0wyo%iv8gicf=3!eb=r9k9!lm!oz1150+=7g@-5i*^' -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.filesystem.Loader', - 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.Loader', -) - -MIDDLEWARE_CLASSES = ( +MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', @@ -98,19 +91,33 @@ 'django.contrib.messages.middleware.MessageMiddleware', # Uncomment the next line for simple clickjacking protection: # 'django.middleware.clickjacking.XFrameOptionsMiddleware', -) +] ROOT_URLCONF = 'urls' # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'wsgi.application' -TEMPLATE_DIRS = ( - # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". - # Always use forward slashes, even on Windows. - # Don't forget to use absolute paths, not relative paths. - os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'), -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': [ + os.path.join(os.path.dirname(__file__), 'templates').replace('\\','/'), + ], + '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', + ], + }, + }, +] INSTALLED_APPS = ( 'django.contrib.auth',