I've modified an Admin with code similar to the following:
def save_formset(self, request, form, formset, change):
instances = formset.save(commit=False)
for instance in instances:
instance.user = request.user
instance.save()
formset.save_m2m()
The problem I'm having is that if a "delete" checkbox is checked, the inline does not get deleted. I tracked this down to forms/models.py:save_existing_objects(). In Django 1.5 it deleted objects regardless of the setting of the commit argument. In django 1.7, it does not delete the objects if commit==False.
Am I missing something in the above that I need to do in order to cause my deleted inlines to be deleted? I can do it by looping through formset.deleted_forms myself (basically duplicating the code from save_existing_objects), but this feels like the wrong way to go about it.
Thanks,
Scott