[Django]-Unable to locate file while rendering tag 'sass_src' in template

2👍

I faced the same issue and in my case I had to configure the STATICFILES_DIRS setting like:

STATICFILES_DIRS = [ BASE_DIR / 'static' ]

NOTE STATIC_ROOT config is not needed in this case

django-sass-processor finds the files using finders. see here:

https://github.com/jrief/django-sass-processor/blob/master/sass_processor/storage.py#L26

The module’s documentation (as you mentioned) suggests to configure them like this:

STATICFILES_FINDERS = [
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'sass_processor.finders.CssFinder',
]

and without STATICFILES_DIRS the FileSystemFinder doesn’t find anything.

Probably the issue is django 3.x related.. or maybe some finder is missing in the list above?

Leave a comment