在 admin 中
    form.changed_data 是一个列表,存有真实改变的字段名称

    1. def save_model(self, request, obj, form, change):
    2. if change and form.changed_data:
    3. print('change!!!')
    4. else:
    5. print('no change!!!')
    6. super(ScenicAdmin, self).save_model(request, obj, form, change)

    在 model 中

    1. class MyModel(models.Model):
    2. f1 = models.CharField(max_length=1)
    3. def save(self, *args, **kw):
    4. if self.pk is not None:
    5. orig = MyModel.objects.get(pk=self.pk)
    6. if orig.f1 != self.f1:
    7. print 'f1 changed'
    8. super(MyModel, self).save(*args, **kw)

    在 form 中

    1. class MyModelForm(forms.ModelForm):
    2. def clean(self):
    3. cleaned_data = super(ProjectForm, self).clean()
    4. #if self.has_changed(): # new instance or existing updated (form has data to save)
    5. if self.instance.pk is not None: # new instance only
    6. if self.instance.f1 != cleaned_data['f1']:
    7. print 'f1 changed'
    8. return cleaned_data
    9. class Meta:
    10. model = MyModel
    11. exclude = []