Hello Dan,
I'm not aware of any third party library handling this but a simple way to achieve
what you're after would be to subclass ModelForm in order to override save()
and pass commit=False in your super() call.
e.g. (untested)
class UpdateFieldsModelForm(ModelForm):
update_fields = None
def save(self, commit=True):
instance = super().save(commit=False)
if commit:
update_fields = None if instance._state.adding else self.update_fields
instance.save(update_fields=self.update_fields)
return instance
Cheers,
Simon