1
0
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:
wrwrwr
2014-11-27 11:22:23 -05:00
committed by Tim Graham
parent e3ea5d4dad
commit 3ac39bb63d
2 changed files with 16 additions and 0 deletions

View File

@@ -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