Skip to content

Compiles all the SASS files in your project on each request

License

Notifications You must be signed in to change notification settings

rtts/django-simplesass

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Simple SASS

This package simply compiles all the SASS files it finds in your Django project and places the compiled CSS files in the same directory. The goal is to simplify both the development and the deployment of SASS source files.

To use Simple SASS, perform the following steps:

  1. Install: pip install git+https://github.com/rtts/django-simplesass.git

  2. Add simplesass to your INSTALLED_APPS:

    INSTALLED_APPS += ['simplesass']

  3. Add the following middleware:

    MIDDLEWARE += ['simplesass.middleware.SimpleSassMiddleware']

Finally, it's very important that you run the development server with the --nostatic command line argument. Otherwise, the middleware will be ignored for static files. During development, however, you will need those static files to be served. You can do so by manually invoking the staticfiles_urlpatterns() function:

from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

urlpatterns = []

if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

About

Compiles all the SASS files in your project on each request

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages