cyberdelia/django-pipeline — pull request #332 by daemonburrito (2014-03-26 20:51:55+00:00)
Title: Optionally render JS templates before code.

My motivation was writing in what I think is a pretty common idiom, where compiled template functions are saved as attributes on View objects before document ready; e.g., as the `template` function on a Backbone View.

Currently, django-pipeline is hard-coded to render the code, then the templates. One solution might be a Django template, which might be more extensible as people can register their custom template. But the solution in this PR is simple; just a `PIPELINE_TEMPLATE_RENDER_FIRST` option (default `True`), which can determine the order.

Btw, there may be something up with your tests. I could only get the suite to run with 0 tests. It could be the project I was working with; I did not investigate.