I'm trying to make use inlineformset_factory to add several data on an
object at the sime time. I want to show 5 extra forms but when I view
it in browser it only shows 1formsets instead of 5.
Here's my view code:
formset = inlineformset_factory(PackagingReport, PeopleProblem,
max_num=0, extra=5, exclude=('report') )
In the template:
<form action="" method="post">
{% for form in formset.form %}
{{ form }}
{% endfor %}
I tried using formset.forms but its not working but when I tried
formset.form it only shows 1extra form:
<table>
{{ formset.form }}
</table>
<input class="button" type="submit" value="Create Report">
<input class="button" type="reset">
</form>
I tried following instructions on formsets, modelformsets, and
inlineformsets but it didn't work. Could anyone tell me how to use
inlineformset in views and in template? I'm using Django1.0.3.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---