maraujop/django-crispy-forms — pull request #217 by tepez (2013-07-30 12:35:45+00:00)
Title: Allow to configure template_pack in FormHelper

## The problem ##
I wanted to render forms using different template packs.
Currently, this cannot be achieved because all layout elements use the same template pack.

## The solution ##
Add a `template_pack` option to `FormHelper`, which will override `CRISPY_TEMPLATE_PACK` if defined.

### Changes ###

* Each layout elements defines `self.template` related to the template pack, e.g. `"/layout/appended_text.html"` instead of `"bootstrap/layout/appended_text.html"`

* The `render()` function prepends `template_pack` to `self.template`.

* Separate the `bootstrap` and the `uni_form` template packs completely, i.e. templates from one should not reference templates from the other. Some templates, e.g. `div.html`, where only in `uni_form` so I copied them to `bootstrap`.

* Some tests are performed only on specific template packs.

## Considerations ##

* Some layout elements are only relevant to specific template pack. What should happen when a user is using a wrong template pack, e.g. when using `bootstrap` to render `MultiField`?