diff --git a/sigi/settings/base.py b/sigi/settings/base.py index c678b2f..0819a1b 100644 --- a/sigi/settings/base.py +++ b/sigi/settings/base.py @@ -30,13 +30,27 @@ MANAGERS = ADMINS SITE_ID = 1 -TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + ( - 'django.core.context_processors.request', -) -# 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', - ) +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + os.path.join(BASE_DIR, 'templates'), + ], + 'APP_DIRS': True, + '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', + 'django.core.context_processors.request', + ], + }, + }, +] # Database routers DATABASE_ROUTERS = ['moodlerouter.MoodleRouter', ] @@ -119,9 +133,6 @@ SERVER_EMAIL = 'sigi@interlegis.leg.br' DEFAULT_FROM_EMAIL = 'spdt@interlegis.leg.br' EMAIL_SUBJECT_PREFIX = u'[SIGI]' -TEMPLATE_DIRS = ( - os.path.join(BASE_DIR, 'templates'), -) MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' diff --git a/sigi/settings/dev.py b/sigi/settings/dev.py index 7bb99bc..03d7ed7 100644 --- a/sigi/settings/dev.py +++ b/sigi/settings/dev.py @@ -20,7 +20,6 @@ DATABASES = { # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -TEMPLATE_DEBUG = DEBUG DEBUG_TOOLBAR_CONFIG = { 'SHOW_TEMPLATE_CONTEXT': True, }