Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)