(self, field)
Returns ``True`` if field has changed from currently saved value
Returns ``True`` if field has changed from currently saved value
Returns True if field has changed from currently saved value
def has_changed(self, field):
        """Returns ``True`` if field has changed from currently saved value"""
        if field in self.fields:
            # deferred fields haven't changed
            if field in self.deferred_fields and field not in self.instance.__dict__:
                return False
            return self.previous(field) != self.get_field_value(field)
        else:
            raise FieldError('field "%s" not tracked' % field)
def has_changed ( self , field ) : if field in self . fields : # deferred fields haven't changed if field in self . deferred_fields and field not in self . instance . __dict__ : return False return self . previous ( field ) != self . get_field_value ( field ) else : raise FieldError ( 'field "%s" not tracked' % field )