Don't reference the old CACHE_BACKEND setting on projects using the Django 1.3 CACHES setting.
This commit is contained in:
committed by
Jannis Leidel
parent
0855ad9258
commit
b5455406ff
@@ -54,4 +54,11 @@ PARSER = getattr(settings, 'COMPRESS_PARSER', 'compressor.parser.BeautifulSoupPa
|
||||
VERBOSE = getattr(settings, "COMPRESS_VERBOSE", False)
|
||||
|
||||
# the cache backend to use
|
||||
CACHE_BACKEND = getattr(settings, 'COMPRESS_CACHE_BACKEND', settings.CACHE_BACKEND)
|
||||
CACHE_BACKEND = getattr(settings, 'COMPRESS_CACHE_BACKEND', None)
|
||||
if CACHE_BACKEND is None:
|
||||
# If we are on Django 1.3 AND using the new CACHES setting...
|
||||
if getattr(settings, "CACHES", None):
|
||||
CACHE_BACKEND = "default"
|
||||
else:
|
||||
# fallback for people still using the old CACHE_BACKEND setting
|
||||
CACHE_BACKEND = settings.CACHE_BACKEND
|
||||
|
||||
Reference in New Issue
Block a user