Skip to content

Instantly share code, notes, and snippets.

@gerardo
Created September 15, 2011 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerardo/1218346 to your computer and use it in GitHub Desktop.
Save gerardo/1218346 to your computer and use it in GitHub Desktop.
Fix for django_compressor issue #120
--- a/compressor/templatetags/compress.py
+++ b/compressor/templatetags/compress.py
@@ -32,7 +32,9 @@ class CompressorNode(template.Node):
exception=ImproperlyConfigured)(*args, **kwargs)
def debug_mode(self, context):
- if settings.COMPRESS_DEBUG_TOGGLE:
+ if settings.DEBUG:
+ return True
+ elif settings.COMPRESS_DEBUG_TOGGLE:
# Only check for the debug parameter
# if a RequestContext was used
request = context.get('request', None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment