jezdez/django_compressor — Issue #173: Compressor should not throw an exception when COMPRESS_DEBUG_TOGGLE is not defined
Author: utahguy
Created: 2011-12-03 23:54:03+00:00
State: open

Getting this exception -

`Caught AttributeError while rendering: 'module' object has no attribute 'COMPRESS_DEBUG_TOGGLE'`

at this line in my template -

`{% compress css %}`

Actual exception occurs at -

.../python2.7/compressor/templatetags/compress.py in debug_mode (line 37):

```python
def debug_mode(self, context):
==> if settings.COMPRESS_DEBUG_TOGGLE:
# Only check for the debug parameter
# if a RequestContext was used
request = context.get('request', None)
if request is not None:
return settings.COMPRESS_DEBUG_TOGGLE in request.GET
```

.