gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-03 17:30:39 24 4
gpt4 key购买 nike

我尝试在 python django 中使用“less”,但收到以下错误

    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


<a href="/image/ZV6jX.png" rel="noreferrer noopener nofollow"><img src="/image/ZV6jX.png" alt="enter image description here"/></a>

最佳答案

我通过安装 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

关于python - 无法应用 CompilerFilter (lessc {infile} {outfile}),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31890810/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com