首页 > 代码库 > djang1.6.5 signal的特别处理

djang1.6.5 signal的特别处理

旧版本  新版本
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)