Created
September 14, 2011 06:16
-
-
Save micolous/1215965 to your computer and use it in GitHub Desktop.
Form template for Django for use with twitter-bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# Include the hidden fields #} | |
{% for hidden in form.hidden_fields %} | |
{{ hidden }} | |
{% endfor %} | |
{# Include the visible fields #} | |
{% for field in form.visible_fields %} | |
<div class="clearfix{% if field.errors %} error{% endif %}"> | |
{{ field.label_tag }} | |
<div class="input"> | |
{{ field }} | |
{% if field.errors %} | |
<span class="help-inline">{{ field.errors }}</span> | |
{% endif %} | |
{% if field.help_text %} | |
<span class="help-block">{{ field.help_text }}</span> | |
{% endif %} | |
</div> | |
</div> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment