Django Compressor Blank Css Output File

When django compresses css, it saves the output to a file in / static / CACHE / css / [filename] .css, however no matter what I try, the css file continues to disappear!

In my template ...

{% compress css %}
<link rel='stylesheet' type='text/less' href='{{ STATIC_URL }}css/deals_for_you.less'/>
{% endcompress %}

I successfully installed django_compressor, django_appconf and versiontools I installed lessc successfully (testecd) STATICFILES_FINDERS installed

COMPRESS_OFFLINE = True
COMPRESS_ENABLED = True
COMPRESS_OFFLINE_CONTEXT = {
    'STATIC_URL': STATIC_URL,
}
COMPRESS_PRECOMPILERS = (
    ('text/less', 'lessc {infile} {outfile}'),
)

Also, when I run

python manage.py compress

He infers ...

Found 'compress' tags in:
    [/my/file/path]/index.html
Compressing... done
Compressed 1 block(s) from 1 template(s)

But the output file that I get (in / static / CACHE / css / d41d8cd98f00.css) is always empty!

+5
source share
1 answer

Did you install through npm or through a ruby ​​stone? If the latter, try updating:

COMPRESS_PRECOMPILERS = (
    ('text/less', 'lessc {infile} > {outfile}'),
)

See a question about this: https://github.com/jezdez/django_compressor/pull/177

0
source

All Articles