do not overwrite SESSION_ENGINE if it is already set (#235)

This commit is contained in:
Nicole Klünder
2016-11-07 19:53:15 +01:00
committed by Raphael Michel
parent 44b6777291
commit 50d82143bc

View File

@@ -122,10 +122,11 @@ if HAS_REDIS:
SESSION_ENGINE = "django.contrib.sessions.backends.cache" SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "redis" SESSION_CACHE_ALIAS = "redis"
if not SESSION_ENGINE and REAL_CACHE_USED: if not SESSION_ENGINE:
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db" if REAL_CACHE_USED:
else: SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
SESSION_ENGINE = "django.contrib.sessions.backends.db" else:
SESSION_ENGINE = "django.contrib.sessions.backends.db"
HAS_CELERY = config.has_option('celery', 'broker') HAS_CELERY = config.has_option('celery', 'broker')
if HAS_CELERY: if HAS_CELERY: