Ticket #4879: post_create_patch.2.diff

File post_create_patch.2.diff, 896 bytes (added by Alexander Solovyov <alexander.solovyov@…>, 17 years ago)

working version

  • django/db/models/base.py

     
    256256        transaction.commit_unless_managed()
    257257
    258258        # Run any post-save hooks.
     259        if (pk_set and not record_exist) or not pk_set:
     260            dispatcher.send(signal=signals.post_create, sender=self.__class__, instance=self)
    259261        dispatcher.send(signal=signals.post_save, sender=self.__class__, instance=self)
    260262
    261263    save.alters_data = True
  • django/db/models/signals.py

     
    55
    66pre_save = object()
    77post_save = object()
     8post_create = object()
    89
    910pre_delete = object()
    1011post_delete = object()
Back to Top