diff options
author | Magnus Hagander | 2018-02-21 17:33:45 +0000 |
---|---|---|
committer | Magnus Hagander | 2018-02-21 17:35:53 +0000 |
commit | b17766cea840dcd00cae455f69fddda49f445737 (patch) | |
tree | b2f21606256809b0d31c4e1eb2ec801f19c66e87 /pgcommitfest/settings.py | |
parent | 5f292219969839d5b08c3f775ff3810ea63de705 (diff) |
Update template configuration syntax
Change to syntax compatible with newer Django, still works on current
version.
Diffstat (limited to 'pgcommitfest/settings.py')
-rw-r--r-- | pgcommitfest/settings.py | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/pgcommitfest/settings.py b/pgcommitfest/settings.py index c4c0e37..44106a7 100644 --- a/pgcommitfest/settings.py +++ b/pgcommitfest/settings.py @@ -87,13 +87,6 @@ STATICFILES_FINDERS = ( # Make this unique, and don't share it with anybody. SECRET_KEY = 'REALLYCHANGETHISINLOCAL_SETTINGS.PY' -# 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 = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', @@ -104,17 +97,18 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'pgcommitfest.urls' -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. - 'global_template/', -) - - -TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( - 'django.core.context_processors.request', -) +TEMPLATES = [{ + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': ['global_templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, +}] INSTALLED_APPS = ( 'django.contrib.auth', |