I am able to get the data that changed on the anchor/main model in an inlineformset
. However getting same for all dependent forms bearing changed data eludes me.
Consider the relationship between Head
and Staff
in:
forms.inlineformset_factory(
Head,
Staff,
form=StaffForm,
extra=1,
min_num=1,
max_num=20,
can_delete=True,
)
I am able to get form.changed_data
for the form representing Head
. However, doing the same for associated forms for Staff
is a mystery to me. formset
does not have changed_data
property. All I can see is a miserable has_changed
property which doesn’t offer any data for further processing. How do I get the changed data in all instances of StaffForm
associated with Head
in a formset?
Any ideas?