Monday, July 26, 2010

Re: Inline formset when pk doesn't exist

I've managed to solve my problem.

view

item_form = ItemForm()
ImageFormSet = formset_factory(ImageForm)
image_formset = ImageFormSet()


template (I'm using uni_form in the template but it's no different)

{{ image_formset.management_form }}
{{ item_form|as_uni_form }}

{% for form in image_formset.forms %}
{{ form|as_uni_form }}
{% endfor %}

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment