diff options
author | Filipp Lepalaan <filipp@mac.com> | 2016-02-09 18:47:35 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2016-02-09 18:47:35 +0200 |
commit | 983ffa251241ffa4f99a669fa490d1600700db17 (patch) | |
tree | a417d7b45e6288ca2cd26fa3144eb46f5bd26d8a /settings.py | |
parent | d4cb244ec9491e2a759566ff8eabc499dce4eea7 (diff) | |
download | Servo-983ffa251241ffa4f99a669fa490d1600700db17.tar.gz Servo-983ffa251241ffa4f99a669fa490d1600700db17.tar.bz2 Servo-983ffa251241ffa4f99a669fa490d1600700db17.zip |
Fix Django 1.9 deprecation warnings
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/settings.py b/settings.py index 3734deb..9eb04a1 100644 --- a/settings.py +++ b/settings.py @@ -79,13 +79,6 @@ STATICFILES_FINDERS = ( #'django.contrib.staticfiles.finders.DefaultStorageFinder', ) - -# List of callables that know how to import templates from various sources. -TEMPLATE_LOADERS = ( - 'django.template.loaders.app_directories.Loader', - 'django.template.loaders.filesystem.Loader', -) - MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', @@ -105,11 +98,25 @@ SESSION_SERIALIZER = 'servo.lib.utils.SessionSerializer' # Python dotted path to the WSGI application used by Django's runserver. WSGI_APPLICATION = 'wsgi.application' -TEMPLATE_DIRS = ( - # Don't forget to use absolute paths, not relative paths. - os.path.join(APP_DIR, 'templates'), - os.path.join(BASE_DIR, 'uploads'), -) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'APP_DIRS': True, + 'DIRS': ( + os.path.join(APP_DIR, 'templates'), + os.path.join(BASE_DIR, 'uploads'), + ), + 'OPTIONS': { + 'context_processors': ( + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.static', + 'django.template.context_processors.request', + 'django.template.context_processors.i18n', + 'django.contrib.messages.context_processors.messages', + ), + } + }, +] INSTALLED_APPS = ( 'django.contrib.auth', @@ -162,15 +169,6 @@ FILE_UPLOAD_HANDLERS = ("django_excel.ExcelMemoryFileUploadHandler", "django_excel.TemporaryExcelFileUploadHandler",) SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" - -TEMPLATE_CONTEXT_PROCESSORS = ( - "django.contrib.auth.context_processors.auth", - "django.core.context_processors.static", - "django.core.context_processors.request", - "django.core.context_processors.i18n", - "django.contrib.messages.context_processors.messages", -) - EXEMPT_URLS = [] LOGIN_URL = '/login/' |