mirror of
https://github.com/django/django.git
synced 2025-07-19 17:19:12 +00:00
[1.9.x] Fixed #26493 -- Documented how built-in signals are sent.
Backport of 47fbbc33de805c803c39483344854caa2890c32c from master
This commit is contained in:
parent
cc38262d40
commit
8bf5cede37
@ -2,7 +2,8 @@
|
|||||||
Signals
|
Signals
|
||||||
=======
|
=======
|
||||||
|
|
||||||
A list of all the signals that Django sends.
|
A list of all the signals that Django sends. All built-in signals are sent
|
||||||
|
using the :meth:`~django.dispatch.Signal.send` method.
|
||||||
|
|
||||||
.. seealso::
|
.. seealso::
|
||||||
|
|
||||||
|
@ -235,9 +235,10 @@ There are two ways to send signals in Django.
|
|||||||
.. method:: Signal.send(sender, **kwargs)
|
.. method:: Signal.send(sender, **kwargs)
|
||||||
.. method:: Signal.send_robust(sender, **kwargs)
|
.. method:: Signal.send_robust(sender, **kwargs)
|
||||||
|
|
||||||
To send a signal, call either :meth:`Signal.send` or :meth:`Signal.send_robust`.
|
To send a signal, call either :meth:`Signal.send` (all built-in signals use
|
||||||
You must provide the ``sender`` argument (which is a class most of the time),
|
this) or :meth:`Signal.send_robust`. You must provide the ``sender`` argument
|
||||||
and may provide as many other keyword arguments as you like.
|
(which is a class most of the time) and may provide as many other keyword
|
||||||
|
arguments as you like.
|
||||||
|
|
||||||
For example, here's how sending our ``pizza_done`` signal might look::
|
For example, here's how sending our ``pizza_done`` signal might look::
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user