├── templates
└── twitter-bootstrap
│ ├── uni_form.html
│ ├── uni_formset.html
│ ├── errors.html
│ ├── errors_formset.html
│ ├── includes.html
│ ├── multifield.html
│ ├── betterform.html
│ ├── field.html
│ ├── field.strict.html
│ ├── whole_uni_form.html
│ └── whole_uni_formset.html
└── README.rst
/templates/twitter-bootstrap/uni_form.html:
--------------------------------------------------------------------------------
1 | {% include "uni_form/errors.html" %}
2 | {% for field in form %}
3 | {% include "uni_form/field.html" %}
4 | {% endfor %}
5 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/uni_formset.html:
--------------------------------------------------------------------------------
1 | {% with formset.management_form as form %}
2 | {% include 'uni_form/uni_form.html' %}
3 | {% endwith %}
4 | {% for form in formset.forms %}
5 |
6 | {% include 'uni_form/uni_form.html' %}
7 |
8 | {% endfor %}
9 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/errors.html:
--------------------------------------------------------------------------------
1 | {% if form.non_field_errors %}
2 |
3 | {% if form_error_title %}
{{ form_error_title }} {% endif %}
4 |
5 | {{ form.non_field_errors|unordered_list }}
6 |
7 |
8 | {% endif %}
9 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/errors_formset.html:
--------------------------------------------------------------------------------
1 | {% if formset.non_form_errors %}
2 |
3 | {% if formset_error_title %}
{{ formset_error_title }} {% endif %}
4 |
5 | {{ formset.non_form_errors|unordered_list }}
6 |
7 |
8 | {% endif %}
9 |
10 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/includes.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | This is used by the 'uni_form_setup' template tag to identify where to grab media files.
3 | {% endcomment %}
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/multifield.html:
--------------------------------------------------------------------------------
1 | {% load uni_form_field %}
2 |
3 | {% if field.is_hidden %}
4 | {{ field }}
5 | {% else %}
6 |
7 | {% if field.label %}
8 |
9 | {% endif %}
10 |
11 | {% if field|is_checkbox %}
12 | {{ field|with_class }}
13 | {% endif %}
14 |
15 | {% if field.label %}
16 | {{ field.label }}
17 | {% endif %}
18 |
19 | {% if not field|is_checkbox %}
20 | {{ field|with_class }}
21 | {% endif %}
22 |
23 | {% if field.label %}
24 |
25 | {% endif %}
26 |
27 | {% endif %}
28 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/betterform.html:
--------------------------------------------------------------------------------
1 | {% for fieldset in form.fieldsets %}
2 |
3 | {% if fieldset.legend %}
4 | {{ fieldset.legend }}
5 | {% endif %}
6 |
7 | {% if fieldset.description %}
8 | {{ fieldset.description }}
9 | {% endif %}
10 |
11 | {% for field in fieldset %}
12 | {% if field.is_hidden %}
13 | {{ field }}
14 | {% else %}
15 | {% include "uni_form/field.html" %}
16 | {% endif %}
17 | {% endfor %}
18 | {% if not forloop.last or not fieldset_open %}
19 |
20 | {% endif %}
21 | {% endfor %}
22 |
23 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/field.html:
--------------------------------------------------------------------------------
1 | {% load uni_form_field %}
2 |
3 | {% if field.is_hidden %}
4 | {{ field }}
5 | {% else %}
6 |
23 | {% endif %}
24 |
--------------------------------------------------------------------------------
/README.rst:
--------------------------------------------------------------------------------
1 | =====================================
2 | ``django-uni-form`` Contrib Templates
3 | =====================================
4 |
5 | What
6 | ----
7 |
8 | Contributed templates for `Daniel Greenfeld `_ and `Miguel Araujo `_'s
9 | awesome `django-uni-form `_ library. Template sets are named for the library they
10 | relate to.
11 |
12 | How
13 | ---
14 |
15 | Clone the repo and copy the folder of templates that you want to use to your current project's template folder, renaming it to
16 | ``uni_form``.::
17 |
18 | cp -r django-uni-form-contrib/twitter-bootstrap /templates/uni_form
19 |
20 | Oh, you probably won't want to include ``django-uni-form``'s media, either, so take it out of your templates.
21 |
22 | Who
23 | ---
24 |
25 | Current contributors are:
26 |
27 | * `Kenneth Love `_.
28 |
29 | License
30 | -------
31 |
32 | All templates are released under the MIT license.
33 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/field.strict.html:
--------------------------------------------------------------------------------
1 | {% load uni_form_field %}
2 |
3 | {% if field.is_hidden %}
4 | {{ field }}
5 | {% else %}
6 |
31 | {% endif %}
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/whole_uni_form.html:
--------------------------------------------------------------------------------
1 | {% if form_tag %}{% endif %}
28 |
--------------------------------------------------------------------------------
/templates/twitter-bootstrap/whole_uni_formset.html:
--------------------------------------------------------------------------------
1 | {% load uni_form_tags %}
2 |
3 | {% if formset_tag %}
4 | {% endif %}
40 |
--------------------------------------------------------------------------------