【发布时间】:2020-11-30 08:15:12
【问题描述】:
您好,我正在使用 Post_save 信号从模型发送通知 ....
但我收到这样的错误“sending_notification() 缺少 1 个必需的位置参数:'request' "
@receiver(post_save, sender=Plan)
def sending_notification(request, sender, instance,created, **kwargs):
if created:
notify.send(request.user, recipient = request.user, verb = "Some messages")
【问题讨论】:
标签: django django-models django-signals