无法应用CompilerFilter(lessc {infile} {outfile})

时间:2015-08-08 07:31:52

标签: python django

我正在尝试使用" less"在python django但我收到以下错误


    COMPRESS_PRECOMPILERS = (('text/less', 'lessc {infile} {outfile}'),)
    COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': 'STATIC_URL',}
    COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.CSSMinFilter']
    COMPRESS_JS_FILTERS = ['compressor.filters.jsmin.JSMinFilter']
    COMPRESS_REBUILD_TIMEOUT = 5400
    query_cache_type = 0
    CACHALOT_ENABLED = True
    CACHALOT_CACHE_RANDOM = True

enter image description here

1 个答案:

答案 0 :(得分:1)

我通过安装ruby解决了我的问题

sudo apt-get install rubygems1.8 ruby1.8-dev
sudo gem install rubygems-update
sudo gem update rubygems
sudo gem install less

命令行用法

  

$ lessc styles.less

     

$ lessc styles.less> styles.css的

或安装

$ sudo apt-get install node-less yui-compressor