3 ms·
We're currently using Django Compressor [0], and it works pretty well. It was slightly annoying to get it to work well with staticfiles [1], as we host all of o
by peter_l_downs 13y ago
We're currently using Django Compressor [0], and it works pretty well. It was slightly annoying to get it to work well with staticfiles [1], as we host all of our content on S3 and serve through cloudfront in production. But, it's nice because now we can do this in our template:
<script src="{% static js/mylib.js %}"></script>
and with compress like this:
{% compress js %}
<script src="{% static js/mylib.js %}"></script>
{% endcompress %}
so that referencing static files is consistent.
[0]: https://github.com/jezdez/django_compressor https://github.com/jezdez/django_compressor
[1]: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#module-django.contrib.staticfiles https://docs.djangoproject.com/en/dev/ref/contrib/staticfile...
- michaelmior 13y agoI used to use this, and it is convenient for small sites. But it quickly gets hard to manage. It also makes it extremely difficult to share compiled assets between pages with different templates.