Closed GoogleCodeExporter closed 8 years ago
what does your template look like, you should be able to iterate through
form.formsets
and access item.formset.
Original comment by norm...@gmail.com
on 29 Jun 2009 at 11:43
I am not using the standard Django FormSets, instead I am using
ragendja.forms.FormWithSets
When using ragendja.forms form.form-field and form.formset are not working.
Example:
1. {{ form.form-field }}
2. {% for form in form.formset %}
Later when I looked at the ragendja.forms code I did notice that it is missing
the
definition for __getitem__. Now I have fixed this in my local ragendja.forms
and it
is working.
Thanks
Original comment by dgkmur...@gmail.com
on 29 Jun 2009 at 4:34
Right, the ragendja formwithsets is designed so that it can be used without the
pesky
requirement to manually supply a template, i.e. just use {{ form }}
A FormWithSet is a wrapper for a Form, that knows how to render FormSetFields
as
FormSets correctly without having to muck about and specify it in the template
manually.
If you really need to iterate through a FormSet in a FormSetField, then you can
loop
{% for boundform in form.formsets %} and use {{ boundform.formset }} to access
each
formset
Hope that helps.
Original comment by norm...@gmail.com
on 29 Jun 2009 at 7:29
So, I guess this can be closed, then?
Original comment by wkornew...@gmail.com
on 3 Jul 2009 at 9:34
Thanks, the call can be closed.
Original comment by dgkmur...@gmail.com
on 3 Jul 2009 at 9:37
I can iterate in the formsetfield
but how do I use {{ form.form-field }} ?
and how do I access form field in {{ boundform.formset }}?
will it be easier if i use django form factory?
Thanks!
Original comment by louyuh...@gmail.com
on 23 Aug 2009 at 4:33
Original issue reported on code.google.com by
dgkmur...@gmail.com
on 25 Jun 2009 at 9:53