Registry / web-framework / django-sass-processor

django-sass-processor

JSON →
library1.4.2pypypiunverified

Django SASS Processor compiles SCSS files into CSS dynamically during development or offline for production. It integrates seamlessly with Django's staticfiles system and provides template tags for easy inclusion of compiled CSS in templates. The current version is 1.4.2, with minor releases occurring every few months, and major versions (like 1.0.0) introducing breaking changes less frequently.

pip install django-sass-processor
INSTALL
IMPORT
SIG · DJANGO-SASS-PROCES
D
django-sass-processor
web-frameworkpythonv1.4.2
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.4.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CssFinder
from sass_processor import CssFinder
from sass_processor import CssFinder

Configure `django-sass-processor` by adding it to `INSTALLED_APPS` and defining `SASS_PROCESSOR_ROOT`. Then, load the `sass_tags` in your templates to reference your compiled SCSS files. Remember to run `python manage.py collectstatic` in production.

import os # settings.py snippet INSTALLED_APPS = [ # ... other Django apps 'django.contrib.staticfiles', 'sass_processor', ] STATIC_URL = '/static/' STATIC_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'staticfiles') # Define where your SCSS files are located SASS_PROCESSOR_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sass') # Example template (e.g., templates/base.html) # Make sure to create a directory 'sass' in your project root # and add an example.scss file: sass/example.scss # body { # color: blue; # } # To test, create a file named 'example.scss' in the SASS_PROCESSOR_ROOT directory: # $body-color: blue; # body { # color: $body-color; # }
Debug
Known issues
breakingIn version 1.0.0, the `compilescss` management command's argument `--use-processor-root` was removed and replaced with `--use-storage`.
fix
Update any scripts or commands that use `manage.py compilescss --use-processor-root` to `manage.py compilescss --use-storage`.
affects: >=1.0.0
breakingIn version 1.0.0, `SassS3Boto3Storage` was removed. It is no longer needed as `django-sass-processor` now works directly with standard `S3Boto3Storage` from `django-storages`.
fix
If you were using `SassS3Boto3Storage`, switch to using `S3Boto3Storage` directly from `django-storages` in your `STATICFILES_STORAGE` setting.
affects: >=1.0.0
gotchaInstallation of `libsass-python` (a core dependency) often fails if a C/C++ compiler is not available on your system, leading to `error: Failed building wheel for libsass-python`.
fix
Ensure you have build tools installed: On Debian/Ubuntu, `sudo apt-get install build-essential`. On macOS, `xcode-select --install`. On Windows, install Visual C++ Build Tools (part of Visual Studio installer) or use WSL.
affects: All versions
gotchaDuring development (`DEBUG=True`), changes to SCSS files may not immediately reflect in the browser due to caching or the processor not detecting file changes.
fix
Ensure `SASS_PROCESSOR_ENABLED = True` (default in DEBUG mode). Clear your browser cache. For persistent issues, manually force recompilation by running `python manage.py compilescss --force`.
affects: All versions
Upgrade
Version history
1.4.2latest on PyPI · released Jun 26, 2025
Audit
Dependencies
libsass-pythonrequiredRequired for SCSS compilation. This package itself often requires a C/C++ compiler to build.
Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
django-sass-processor — pip install django-sass-processor · libregistry