@receiver(post_save, sender=Action, dispatch_uid='action_create_notifications')
def add_notification_for_action(sender, instance, created, **kwargs):
 if (not created):
  return
 from kitsune.notifications import tasks
 tasks.add_notification_for_action.delay(instance.id)

@ receiver ( post_save , sender = Action , dispatch_uid = 'action_create_notifications' ) def add_notification_for_action ( sender , instance , created , ** kwargs ) : if ( not created ) : return from kitsune . notifications import tasks tasks . add_notification_for_action . delay ( instance . id )
when an action is created .