def __setitem__(self, i, values): relation = self.field.relation old_values = self.elements[i] model_object = self.model_object DCMirror.__setitem__(self, i, values) relation.affect(model_object, i, old_values, values, Relation.TYPE_MODIFY)
def __delitem__(self, i): relation = self.field.relation old_values = self.elements[i] model_object = self.model_object DCMirror.__delitem__(self, i) relation.affect(model_object, i, old_values, None, Relation.TYPE_DELETE)
def insert(self, i, value): relation = self.field.relation model_object = self.model_object DCMirror.insert(self, i, value) relation.affect(model_object, i, None, value, Relation.TYPE_ADD)