Login

Printing inline formsets as UL / P

Author:
ikke
Posted:
August 25, 2009
Language:
HTML/template
Version:
Not specified
Score:
0 (after 2 ratings)

By default all forms created using inlineformset_factory are displayed as tables (because there is only a .as_table method) and there are no .as_p or .as_ul methods in them, so you need to do that by hand.

1
2
3
{% for extraform in form.extra_forms %}
    {{ extraform.as_ul }}
{% endfor %}

More like this

  1. Bootstrap Accordian by Netplay4 7 years, 9 months ago
  2. Bootstrap theme for django-endless-pagination? by se210 10 years, 9 months ago
  3. Bootstrap theme for django-endless-pagination? by se210 10 years, 9 months ago
  4. Reusable form template with generic view by roldandvg 10 years, 10 months ago
  5. Pagination Django with Boostrap by guilegarcia 11 years ago

Comments

Please login first before commenting.