mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.7.x] Added notes on registering signals in ready() and using dispatch_uid.
Refs #23641.
Backport of d66bda6059 from master
This commit is contained in:
@@ -153,6 +153,13 @@ Now, our ``my_callback`` function will be called each time a request finishes.
|
||||
versions of Django, signal registration usually happened in the
|
||||
``models`` module.
|
||||
|
||||
.. note::
|
||||
|
||||
The :meth:`~django.apps.AppConfig.ready` method may be executed more than
|
||||
once during testing, so you may want to :ref:`guard your signals from
|
||||
duplication <preventing-duplicate-signals>`, especially if you're planning
|
||||
to send them within tests.
|
||||
|
||||
.. _connecting-to-specific-signals:
|
||||
|
||||
Connecting to signals sent by specific senders
|
||||
|
||||
Reference in New Issue
Block a user