Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (19 sloc) 765 Bytes

Django bootatrap form

Generate twitter-bootstrap form output for django form

A django template tag to work with twitter bootstrap ( )


$ pip install django-bootstrap-form

for people who still use older version before twitter bootstrap 2.0

$ pip install django-bootstrap-form==0.2


Add 'bootstrapform' to INSTALLED_APPS.


{% load bootstrap %}

{{ form|bootstrap }}

{{ form|bootstrap:"css_class1 css_class2" }} - To add both classes to all fields in the form

{{ form.<field name>|bootstrap:"css_class1 css_class2" }} - To output individual fields and add css classes to the input/textarea/select