I'm trying to find out how django's save() works. And there is some thing I can't understand. Is there any way to know what field is updating at the moment?
The best way I know is use pre_save() signal and do smth like this:
current_field_val = instance.my_field
old_field_val == sender.objects.get(pk=instance.pk).my_field
if current_field_val != old_field_val:
# do smth
But I don't want to select from DB. And how DjangoORM knows what field needs to be updated, or it updates all fields in the model(it seems to me it's strange behaviour).