def _as_dict(self):
    return dict([(f.name, getattr(self, f.name)) for f in self._meta.
        local_fields if not f.rel])

def get_dirty_fields(self):
    new_state = self._as_dict()
return dict([(key, value) for key, value in self._original_state.items(
    ) if value != new_state[key]])
Dirty fields in django