Take the 2-minute tour ×

Using the Rails assets pipeline and a plugin for require.js, I can use CoffeeScript, SASS, files organized however I like and get it all compiled to a single JavaScript and single CSS file for production. Is there a matching setup for use with Django? It needs to support the above, CofeeeScript, SASS, Require.JS with a development mode where files are served individually as well as a production mode where everything gets compiled into single files.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

I’m using Django Compressor and I’m pretty happy with it. It supports pre-processors so Coffeescript, Sass and so on are supported. Check out the documentation.

EDIT: Here is my settings for SASS and Coffeescript, in settings.py:


  ('text/coffeescript', 'coffee --compile --stdio'),
  ('text/x-sass', 'sass {infile} {outfile}'),
  ('text/x-scss', 'sass --scss {infile} {outfile}'),
share|improve this answer
What about getting the requirejs optimizer in there..? –  SoftMemes Mar 10 '12 at 19:34
I created a templatetag for labjs that is compatible with django compressor:github.com/ashwoods/django-labjs –  ashwoods Mar 11 '12 at 10:31

Your Answer


