class DirtyFieldsMixin(object):

    def __init__(self, *args, **kwargs):
        super(DirtyFieldsMixin, self).__init__(*args, **kwargs)
self._original_state = self._as_dict()

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):
    pass
Dirty fields in django