In your project settings, override Django’s default static files storage with the staticassets storage to compile and collect your assets to be served in production, and define which manifests you want to compile
STATICFILES_STORAGE = 'staticassets.storage'
STATICASSETS_MANIFESTS = ('css/application', 'js/application')
In the templates file, load the staticassets and link your manifests (no need to specify the file extension), the path is appended to the STATIC_ROOT location
{% load staticassets %}
{% stylesheet "css/application" %}
<link rel="stylesheet" href="{{ asset.url }}"/>
{% endstylesheet %}
{% javascript "js/application" %}
<script src="{{ asset.url }}"></script>
{% endjavascript %}
staticassets uses the same directives syntax and preprocessing as Sprockets you can use Sass, Less and Stylus for stylesheets, and Coffeescript or EJS for scripts, Their compilers just have to be available on the path
stylesheets:
/*
*= require application/styles/fonts/lato
*= require application/styles/fonts/awesome
*/
scripts:
//= require foundation/jquery
//= require foundation
To compile and collect your assets to the STATIC_ROOT location, use the collectstatic command
$ manage.py collectstatic