jezdez/django_compressor — Issue #144: Quietly discards stylesheets when DEBUG = True and no text/css "compiler" set
Author: natevw
Created: 2011-10-28 17:48:15+00:00
State: open

I followed the patterns suggested in http://blog.davidziegler.net/post/7617900947/django-css-is-dead-long-live-django-compressor for migrating from django-css.

However, I found that when following this example...

{% load compress %}
{% compress css %}

{% endcompress %}

...and only defining a text/x-sass handler in `COMPRESS_PRECOMPILERS` as given in all the examples, results in any link to an already-"compiled" file like /media/css/one.css simply being silently **dropped** (!?) when `DEBUG = True` (i.e. `COMPRESS_ENABLED = False`).

To get my plain-CSS files to remain in the final HTML when not being combined, I had to provide an explicit "compiler" for text/css:

COMPRESS_PRECOMPILERS = (
('text/x-sass', 'sass {infile} {outfile}'),
('text/css', 'cp {infile} {outfile}'), # grrwut?
)

That seems kinda uncool, and the documentation makes no mention of it — so perhaps it's not supposed to be necessary?