From 14d629afe911c5c8b1eea8fd6362d55665c65c1b Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 25 Feb 2014 18:12:14 +0000 Subject: [PATCH] Fixed another bug in the non-production setup. - Legacy-Id: 7344 --- ietf/settings.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index e0f0b508d..7fba241e5 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -294,21 +294,13 @@ CACHE_MIDDLEWARE_SECONDS = 300 CACHE_MIDDLEWARE_KEY_PREFIX = '' # The default with no CACHES setting is 'django.core.cache.backends.locmem.LocMemCache' -if SERVER_MODE == 'production': - - CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', - 'LOCATION': '127.0.0.1:11211', - } - } -else: - # Default to no caching in development/test - CACHES = { - 'default': { - 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', - } +# This setting is possibly overridden further down, after the import of settings_local +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'LOCATION': '127.0.0.1:11211', } +} IPR_EMAIL_TO = ['ietf-ipr@ietf.org', ] DOC_APPROVAL_EMAIL_CC = ["RFC Editor ", ] @@ -416,5 +408,11 @@ from settings_local import * # absolutely vital that django fails to start in production mode unless a # secret key has been provided elsewhere, not in this file which is # publicly available, for instance from the source repository. -if SERVER_MODE != 'production' and 'SECRET_KEY' not in locals(): - SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka' +if SERVER_MODE != 'production': + CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', + } + } + if 'SECRET_KEY' not in locals(): + SECRET_KEY = 'PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHka'