March 10, 2009
My Django-Compress Tasks
There are number of things that I'll be looking to add over the next couple of days that hopefully will make it even more useful for more than just me. I'll be committing these to my fork and submitting pull requests upstream to hopefully have them committing into the main repository.
- For output files, create the intermediary folders if they don't exist.
- Add a gzip option flag to the command to create gzip versions of the output files.
- Add a new css filter for replacing url() property contents with prefixes defined in configuration (allowing for the serving of content locally during development, and then off of CDN servers when deployed).
- Add a new version strategy, that will default to a prefix folder using today's timestamp (YYYYMMDD). Also allow for an optional parameter to the command line to override this default prefix.
- Add another "extra_context" variable called ABSOLUTE_URL to enable an override of both the PREFIX variable I included yesterday as well as the default MEDIA_URL. I need this so as to be able to put things like Google hosted libraries like jQuery, but also to have a quick and easy way to revert to hosting it myself in production.
My goal for these additions is to keep them isolated and non-obstrusive so that they exist if others want to use them but don't get in the way of anything or otherwise clutter up the code.
I'd love to hear any feedback about these or other related ideas.