def create_chapter_notification(sender, instance, created, **kwargs): if created: notification = Notification() notification.user_id = instance.member_id notification.type = Notification.JOIN_CHAPTER notification.chapter_id = instance.chapter_id notification.save()