2👍
Among the contenders I have chosen django-compressor because it is incredibly simple to use. Just put one or two tags (typical scenario: one for css and another for js) in the template and for most cases you are done without modifying anything; you don’t even have to declare or modify settings, its default settings are good.
11👍
As you have already noticed, they all do the same thing (more or less). I decided to go ahead with django_compressor.
Also, I prefer to set expire headers or apply on-the-fly compression at the web server level. IMHO these operations should not be performed by the application itself, because sometimes it can lead to some issues, for instance setting Cache-Control or expiration headers on error pages etc. The mod_expires module is very easy to configure according to your needs. For on-the-fly compression using the DEFLATE output filter, I have used this mod_deflate configuration as is.
- [Django]-Unknown format code 'f' for object of type 'unicode'
- [Django]-Django E.408, E.409 and E.410 errors on runserver
- [Django]-Remove Labels in a Django Crispy Forms
7👍
New projects have been created since this question was asked.
You might want to take a look at django-pipeline, it’s pretty nifty.
- [Django]-Make the first letter uppercase inside a django template
- [Django]-How to Create a form from a json-schema?
- [Django]-What is actually assertEquals in Python?
4👍
I’ve been using django-compress and I’m happy with it, especially because I can specify the back-end compressor (YUI works best with my JS for example).
I will probably consider switching to django_compressor in the future, but it’s too low priority atm.
I would also point out that django-media-bundler has one feature the others don’t… automatic building of image sprites. I haven’t used it live, so I’m not sure how well it is implemented but that’s pretty neat. You can use it just for the sprites and leave css/js for one of the other compressors.
- [Django]-Difference between @cached_property and @lru_cache decorator
- [Django]-In a django model custom save() method, how should you identify a new object?
- [Django]-Django manage.py –no-input . Yes or no?
2👍
FWIW since djangopluggables.com doesn’t exist anymore and nobody has mentioned it here yet: The most recent comparison is on djangopackages.com, where django_compressor is the most used one ATM. Haven’t tried it with 1.4 though as Jay Taylor warned in his comment.
- [Django]-How to use Django to get the name for the host server?
- [Django]-Get request body as string in Django
- [Django]-Django: change the value of a field for all objects in a queryset