Django信号:不适用于所有处理程序

时间:2019-09-12 09:54:50

标签: events django-signals django-2.1

我再次遇到只有我的处理程序首先启动的情况

文件:signals.py

from django.dispatch import receiver
from django.db.models import signals

@receiver(signals.post_save, sender=New)
def handler1(sender, instance, **kwargs):
    pass

@receiver(signals.post_save, sender=New)
def handler2(sender, instance, **kwargs):
    pass

0 个答案:

没有答案