(self)
return {k: v for k, v in saved if v != current[k]}
Returns dict of fields that changed since save (with old values)
Returns dict of fields that changed since save (with old values)
Returns dict of fields that changed since save ( with old values )
def changed(self):
        """Returns dict of fields that changed since save (with old values)"""
        if not self.instance.pk:
            return {}
        saved = self.saved_data.items()
        current = self.current()
        return {k: v for k, v in saved if v != current[k]}
def changed ( self ) : if not self . instance . pk : return { } saved = self . saved_data . items ( ) current = self . current ( ) return { k : v for k , v in saved if v != current [ k ] }