mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #31327 -- Deprecated providing_args argument for Signal.
This commit is contained in:
committed by
Carlton Gibson
parent
5ca76baa72
commit
769cee5252
@@ -216,24 +216,17 @@ its own signals.
|
||||
Defining signals
|
||||
----------------
|
||||
|
||||
.. class:: Signal(providing_args=list)
|
||||
.. class:: Signal()
|
||||
|
||||
All signals are :class:`django.dispatch.Signal` instances. The
|
||||
``providing_args`` is a list of the names of arguments the signal will provide
|
||||
to listeners. This is purely documentational, however, as there is nothing that
|
||||
checks that the signal actually provides these arguments to its listeners.
|
||||
All signals are :class:`django.dispatch.Signal` instances.
|
||||
|
||||
For example::
|
||||
|
||||
import django.dispatch
|
||||
|
||||
pizza_done = django.dispatch.Signal(providing_args=["toppings", "size"])
|
||||
pizza_done = django.dispatch.Signal()
|
||||
|
||||
This declares a ``pizza_done`` signal that will provide receivers with
|
||||
``toppings`` and ``size`` arguments.
|
||||
|
||||
Remember that you're allowed to change this list of arguments at any time, so
|
||||
getting the API right on the first try isn't necessary.
|
||||
This declares a ``pizza_done`` signal.
|
||||
|
||||
Sending signals
|
||||
---------------
|
||||
|
||||
Reference in New Issue
Block a user