1. Benoît Bryon
  2. django-formrenderingtools

Source

django-formrenderingtools / django_formrenderingtools / templates / tests / formrenderingtools / form_source.html

{% load form_layouts %}
<!-- The default layout with a valid form -->
<form>
  {% form %}
  <input type="submit">
</form>

<!-- The default layout with an invalid form -->
<form>
  {% form form=error_form %}
  <input type="submit">
</form>

<!-- Use a wrong layout => fallback to default layout -->
<form>
  {% form layout="a_layout_which_does_not_exist" %}
  <input type="submit">
</form>

<!-- Use another layout (it says "Hello") -->
<form>
  {% form layout="hello" %}
</form>