Hi!
I just figured this one out and would like to share my solution for
posterity: Since the formset in question is a ModelFormSet (which I
forgot to mention in the above message, sorry!), the data for each
form can be accessed using "form.instance". Thus, the regroup tag
should read:
{% regroup
Hi!
I'd like to structure a formset of a given model by an attribute of the model,
just as the regroup template tag would do. Therefore, I tried to apply regroup
as one would outside a formset:
{% regroup formset.forms by attribute as forms_by_attribute %}
{% for group in forms_by_attribute %}
2 matches
Mail list logo