classCustomManager(models.Manager): defbulk_create(self, items, **kwargs): for i in items: post_save.send(i.__class__, instance=i, created=True) returnsuper().bulk_create(items, **kwargs) defbulk_update(self, items, fields, **kwargs): super().bulk_update(items, fields, **kwargs) for i in items: post_save.send(i.__class__, instance=i, created=False)