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_CACHE_ALIAS = "redis"
if not SESSION_ENGINE and REAL_CACHE_USED:
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
else:
SESSION_ENGINE = "django.contrib.sessions.backends.db"
if not SESSION_ENGINE:
if REAL_CACHE_USED:
SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
else:
SESSION_ENGINE = "django.contrib.sessions.backends.db"
HAS_CELERY = config.has_option('celery', 'broker')
if HAS_CELERY: