Closed AnderUstarroz closed 7 years ago
When you have DEBUG set to True
, are the CSS files created? If so, then the problem lies with compilescss
, if not then the problem lies with your config. But it seems fine. Could you perhaps try adding SASS_PROCESSOR_ENABLED = True
?
django-compressor
also requires django-compressor
to be installed, but I assume you have that installed because it doesn't seem to be throwing any errors.
SASS_PROCESSOR_INCLUDE_DIRS
is bypassed to the compiler to look for further scss files which are @import "..."
-ed, from other scss files.
Therefore your setup doesn't work. You should add your scss files to the static
folder just as if they would be css
files.
I don't really like the idea of having my scss files on a public static folder, but it seems to be the default. I have tried the following structure in my project:
This is my config in
settings.py
:And this is the link within
layout.html
:But when running
python manage.py compilescss
0 files are compiled. Could you help me out to find what is wrong in my config? When I use{% sass_src 'styles.scss' %}
the file "styles.scss" will be searched using the SASS_PROCESSOR_INCLUDE_DIRS right? Or there is no chance to keep the SCSS files outside from the static folder?