Django Compressor combines and compresses linked and inline Javascript or CSS in a Django template into cacheable static files by using the compress template tag.

HTML in between {% compress js/css %} and {% endcompress %} is parsed and searched for CSS or JS. These styles and scripts are subsequently processed with optional, configurable compilers and filters.

The default filter for CSS rewrites paths to static files to be absolute and adds a cache busting timestamp. For Javascript the default filter compresses it using jsmin.

As the final result the template tag outputs a or <link> tag pointing to the optimized file. These files are stored inside a folder and given a unique name based on their content. Alternatively it can also return the resulting content to the original template directly.<br><br>Since the file name is dependent on the content these files can be given a far future expiration date without worrying about stale browser caches.<br><br>The concatenation and compressing process can also be jump started outside of the request/response cycle by using the Django management command manage.py compress.

Code Quality Rank: L3
Programming language: Python
License: MIT License
Tags: HTTP     Django     Asset Management     Internet     WWW     2.2     3.1     3.2     4.0     4.1     4.2    
Latest version: v2.4

django-compressor alternatives and similar packages

Based on the "Asset Management" category.
Alternatively, view django-compressor alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of django-compressor or a related project?

Add another 'Asset Management' Package