Skip to content

Instantly share code, notes, and snippets.

@23maverick23
Last active October 12, 2015 00:37
Show Gist options
  • Save 23maverick23/3943819 to your computer and use it in GitHub Desktop.
Save 23maverick23/3943819 to your computer and use it in GitHub Desktop.
Django: Form control label with errors
<div class="control-group{% if form.name.errors %} error{% endif %}">
<label class="control-label" for="name">Name:</label>
<div class="controls">
{{ form.name }}
{% if form.name.errors %}<span class="help-inline">{{ form.name.errors }}</span>{% endif %}
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment