旧版本 | 新版本 |
def my_handler(sender) | def my_handler(sender, **kwargs) |
my_signal = object() | my_signal = django.dispatch.Signal() |
dispatcher.connect(my_handler, my_signal) | my_signal.connect(my_handler) |
dispatcher.send(my_signal, sender) | my_signal.send(sender) |
dispatcher.connect(my_handler, my_signal, sender=Any) | my_signal.connect(my_handler, sender=None) |
djang1.6.5 signal的特别处理
时间: 2024-10-10 06:06:53