Actually got rid of the duplicate check of COMPRESS_ENABLED and move check for settings.DEBUG in the callable method instead. This should make the check a little bit more stable.

This commit is contained in:
Jannis Leidel
2011-08-09 10:02:08 +02:00
parent b1e164a46e
commit 1d1b36bd55

View File

@@ -7,7 +7,7 @@ from compressor.utils.settings import AppSettings
class CompressorSettings(AppSettings):
# Main switch
ENABLED = not global_settings.DEBUG
ENABLED = False
# Allows changing verbosity from the settings.
VERBOSE = False
# GET variable that disables compressor e.g. "nocompress"
@@ -61,7 +61,7 @@ class CompressorSettings(AppSettings):
OFFLINE_CONTEXT = {}
def configure_enabled(self, value):
return value or getattr(global_settings, 'COMPRESS_ENABLED', value)
return value or not global_settings.DEBUG
def configure_root(self, value):
if value is None: