Hi everyone,

Is it possible to clone a formset (inlineformset_factory)?

I'm not sure what would be the correct way to do so.

I am able to clone the form by:

form = self.get_form(form_class)
form.instance.pk = None
form.instance.save()

When it comes to the formset I don't know the method.
I think I understand that it is the formset's management_form that I need 
to manipulate to set the foeignkey to the cloned form.pk

Any suggestions?

I hope my question makes some sense.

Thanks

Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4897cca2-acd9-4e21-bbc1-10746b84aa72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to