diff --git a/cof/settings/common.py b/cof/settings/common.py index 4a6f9a12..93b11dae 100644 --- a/cof/settings/common.py +++ b/cof/settings/common.py @@ -3,7 +3,7 @@ Django common settings for cof project. Everything which is supposed to be identical between the production server and -the local development serveur should be here. +the local development server should be here. """ import os @@ -79,6 +79,7 @@ TEMPLATES = [ 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ + 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', @@ -118,10 +119,6 @@ USE_L10N = True USE_TZ = True - -# Media upload (through ImageField, SiteField) -# https://docs.djangoproject.com/en/1.9/ref/models/fields/ - # Various additional settings SITE_ID = 1 diff --git a/cof/settings/dev.py b/cof/settings/dev.py index 8f5c9f29..6272e6d9 100644 --- a/cof/settings/dev.py +++ b/cof/settings/dev.py @@ -12,10 +12,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DEBUG = True -TEMPLATES[0]["OPTIONS"]["context_processors"] += [ - 'django.template.context_processors.debug' -] - # --- # Apache static/media config @@ -46,7 +42,10 @@ def show_toolbar(request): return True INSTALLED_APPS += ["debug_toolbar"] -MIDDLEWARE_CLASSES += ["debug_toolbar.middleware.DebugToolbarMiddleware"] +MIDDLEWARE_CLASSES = ( + ["debug_toolbar.middleware.DebugToolbarMiddleware"] + + MIDDLEWARE_CLASSES +) DEBUG_TOOLBAR_CONFIG = { 'SHOW_TOOLBAR_CALLBACK': show_toolbar, }