Ticket #2207: add_change_manipulators_patch.diff

File add_change_manipulators_patch.diff, 1.2 KB (added by Rajesh Dhawan <rajesh.dhawan@…>, 18 years ago)

Add/change manipulator patch

  • django/db/models/manipulators.py

     
    230230            order = new_data['order_'] and map(int, new_data['order_'].split(',')) or []
    231231            for rel_opts in self.opts.get_ordered_objects():
    232232                getattr(new_object, 'set_%s_order' % rel_opts.object_name.lower())(order)
     233       
     234        manipulator_signal = self.change and signals.post_change_manipulator_save or signals.post_add_manipulator_save
     235        dispatcher.send(signal=manipulator_signal, sender=self.__class__, instance=new_object)
    233236        return new_object
    234237
    235238    def get_related_objects(self):
  • django/db/models/signals.py

     
    66pre_save = object()
    77post_save = object()
    88
     9post_add_manipulator_save = object()
     10post_change_manipulator_save = object()
     11
    912pre_delete = object()
    1013post_delete = object()
    1114
    1215post_syncdb = object()
     16
Back to Top