Beispiel #1
0
 def apply_to(self, model, **kwds):
     """
     Apply the transformation to the given model.
     """
     timer = TransformationTimer(self, 'in-place')
     if not hasattr(model, '_transformation_data'):
         model._transformation_data = TransformationData()
     self._apply_to(model, **kwds)
     timer.report()
Beispiel #2
0
 def apply_to(self, model, **kwds):
     """
     Apply the transformation to the given model.
     """
     timer = TransformationTimer(self, 'in-place')
     if not hasattr(model, '_transformation_data'):
         model._transformation_data = TransformationData()
     self._apply_to(model, **kwds)
     timer.report()
Beispiel #3
0
 def create_using(self, model, **kwds):
     """
     Create a new model with this transformation
     """
     timer = TransformationTimer(self, 'out-of-place')
     if not hasattr(model, '_transformation_data'):
         model._transformation_data = TransformationData()
     new_model = self._create_using(model, **kwds)
     timer.report()
     return new_model
Beispiel #4
0
 def create_using(self, model, **kwds):
     """
     Create a new model with this transformation
     """
     timer = TransformationTimer(self, 'out-of-place')
     if not hasattr(model, '_transformation_data'):
         model._transformation_data = TransformationData()
     new_model = self._create_using(model, **kwds)
     timer.report()
     return new_model