jrief / django-sass-processor

SASS processor to compile SCSS files into *.css, while rendering, or offline.
MIT License
402 stars 64 forks source link

doesn't convert *.scss files into *.css #51

Closed avmak closed 7 years ago

avmak commented 8 years ago

Hi. I have the example set up according to the guide but sass_src doesn't work. Сhecked settings but didn't find a problem.

$ pip list Django (1.10.2) django-compressor (2.1) django-sass-processor (0.5.1) libsass (0.11.2) django-zurb-foundation-rtl (6.0.6.3)

My file settings.py:

BASE_DIR` = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'foundation',
    'sass_processor',
    'testapp',
]
STATIC_URL = '/static/'
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'), ]
STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'sass_processor.finders.CssFinder',
 ]
SASS_PROCESSOR_ENABLED = True
SASS_PROCESSOR_ROOT = os.path.join(BASE_DIR, 'static_final')
SASS_OUTPUT_STYLE = 'compact'

In my Django template in directory BASE_DIR/testapp/templates/testapp/index.html:

{% load sass_tags %}
<link href="{% sass_src 'foundation/scss/foundation.scss' %}" rel="stylesheet" type="text/css" />

The directory BASE_DIR/static_final/foundation/scss/ contains two files: foundation.css foundation.css.map foundation.zip

What do you think about it?

Thanks, Alexey

jrief commented 7 years ago

so if you delete foundation.css and foundation.css.map and rerun the above View, then these files are recreated? If that's the case then presumably the the static file finder didn't find the file. This then is a Django configuration problem. Could you please check if that's the case.

jrief commented 7 years ago

Can I close this?