jezdez/django_compressor — pull request #285 by jannon (2012-07-15 22:41:58+00:00)
Title: Enhanced compress template tag

### Background

I used and heavily modified django-compress for a while, but needed something else when the project stalled. Django_compressor offered some continuity (filters/extensibility) and some very welcome differences (parsing blocks from the code). I would like to see django_compressor be the basis for a full modern web asset handling package, that works well with modern best practises (e.g. asynchronous asset loaders, css sprites, etc). To that end, my plan is to start with django_compressor's extensibility, enhance it a little bit, then build some useful stuff on top of it (e.g. filters/compilers for images). The first step, however is just adding a little more flexibility and standardization to the template tag

### What's in this pull request

* Let tag arguments after kind (css|js) be specified in any order
* Use more standard 'as ' syntax to name the code block
* Add ability to specify options in the tag

#### Tag Argument Order

There's not really any need to enforce a certain arrangement of arguments in the tag so let's just let people specify them however they want after the kind parameter. So now all of these are valid:

{% compress js inline as main %}

{% compress js as main file %}

{% compress css group_first=true as base %}