settings: only enable option when it is set to 'yes'

fixes #5006
This commit is contained in:
Frédéric Péters 2014-06-19 17:53:41 +02:00 committed by Benjamin Dauvergne
parent 510da1beb8
commit 01a569ddf7
1 changed files with 3 additions and 3 deletions

View File

@ -286,7 +286,7 @@ CMS_PAGE_CACHE = False
CMS_PLUGIN_CACHE = False
# Do we use memcached ?
if 'USE_MEMCACHED' in os.environ:
if os.environ.get('USE_MEMCACHED', 'no') == 'yes':
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
@ -297,7 +297,7 @@ if 'USE_MEMCACHED' in os.environ:
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db'
if 'USE_DEBUG_TOOLBAR' in os.environ:
if os.environ.get('USE_DEBUG_TOOLBAR', 'no') == 'yes':
try:
import debug_toolbar
MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)
@ -340,7 +340,7 @@ except ImportError, e:
if not CMS_TEMPLATES:
raise ImproperlyConfigured('You must define CMS_TEMPLATES')
if 'MULTITENANT_MODE' in os.environ:
if os.environ.get('MULTITENANT_MODE', 'no') == 'yes':
try:
from tenant_settings import *
except ImportError: