earle/django-bootstrap — Issue #26: Adding templatetags support?
Author: devfeng
Created: 2012-02-05 07:53:55+00:00
State: open

I've been using django-uni-form in the past. It can be used both in forms.py and as templatetag in a template.

The reason for templatetags support is simple: it's easy to write your own forms based on BootstrapForm/BootstrapModalForm/etc, however when you are using 3rd-party apps, replacing ALL forms.Form with BootstrapForm in source files would not be a good idea.

Actually there is another Django app which provides a simple templatetag "as_bootstrap" to convert Django standard form output to bootstrap style:
https://github.com/dyve/django-bootstrap-toolkit

It worked well until bootstrap upgraded to 2.0.0. It doesn't have fieldset support though (due to the nature of templatetags).

Both methods have their own advantage: in forms you have more control (like fieldset support, which is also provided in django-uni-form), and in templatetag you can simply convert standard forms used by 3rd-party apps to bootstrap style.

So I was wondering if you can add templatetags support in django-bootstrap? Probably a similar "as_bootstrap" templatetag.

Thanks.