1👍
Use commit=False
in ModelForm.save
, like this:
instance = form.save(commit=False)
if requires_update:
instance.field_to_change = value_to_set
instance.save()
Source:stackexchange.com
1👍
Use commit=False
in ModelForm.save
, like this:
instance = form.save(commit=False)
if requires_update:
instance.field_to_change = value_to_set
instance.save()