weak – Django stores signal handlers as weak references byĭefault.SeeĬonnecting to signals sent by specific senders for more information. sender – Specifies a particular sender to receive signals from.See Receiver functions for more information. receiver – The callback function which will be connected to this.connect( receiver, sender=None, weak=True, dispatch_uid=None) ¶ Parameters: All of the signal’s receiver functions are called one at a time, in The receiver function is called when the signal To receive a signal, register a receiver function using the You can also define and send your own custom signals see below. See the built-in signal documentation for a complete list,Īnd a complete explanation of each signal. Sent when Django starts or finishes an HTTP request. Sent when a ManyToManyField on a model is changed. ![]() Sent before or after a model’s save() method They’re especially useful when many pieces of code may beĭjango provides a set of built-in signals that let userĬode get notified by Django itself of certain actions. In a nutshell, signalsĪllow certain senders to notify a set of receivers that some action has Notified when actions occur elsewhere in the framework. Django includes a “signal dispatcher” which helps decoupled applications get
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |