jezdez/django_compressor — pull request #337 by peteralaoui (2012-11-25 19:58:12+00:00)
Title: Fix CSS Absolute Filter bug when working with remote files

Hi,

It seems to me that every time I tried to set my production app setting DEBUG to False, the css absolute filter wasn't applied. So after a little digging, I found that the condition

```python
if (not (filename and filename.startswith(self.root)) and
not self.find(basename)):
return self.content
```

wasn't taking into account if the file wasn't stored on the server root path.
Indeed, I was forced to set COMPRESS_ROOT equal to STATIC_ROOT (correct me if I'm wrong). Then STATIC_ROOT need to be a local path on the server and can't be a remote path to a S3 bucket.

So ``filename`` never starts with ``this.root`` value.

If I'm miss-understading the usual settings to work well with Amazon S3 assets tell me, I'm sure I'm not the first one to use this configuration.