Login

Printing inline formsets as UL / P

Author:
ikke
Posted:
August 25, 2009
Language:
HTML/template
Version:
Not specified
Tags:
django formset inline not-django-admin
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. InlineFormset Template by petry 6 years, 4 months ago
  2. Making a django inline (model) formset really tabular by fnl 5 years, 11 months ago
  3. Unique field inline formset by dcwatson 2 years, 6 months ago
  4. Embedded inline formsets in ModelForm by stan 4 years, 4 months ago
  5. Different number of extra formsets in add/change view of ModelAdmin. by xormag 3 years, 8 months ago

Comments

Please login first before commenting.