diff options
| author | wrwrwr <git@wr.waw.pl> | 2014-11-27 11:22:23 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-27 11:23:43 -0500 |
| commit | 3ac39bb63d6155c784690394d27bbdfc4b80f957 (patch) | |
| tree | 0f8911adb3bb3792b5270d133109c5420a5bd075 /docs/topics | |
| parent | e3ea5d4dad95a95de1f41893475a423a5e5c08d5 (diff) | |
[1.7.x] Added notes on registering signals in ready() and using dispatch_uid.
Refs #23641.
Backport of d66bda60590daabe21f60a532a613a31a10fedbd from master
Diffstat (limited to 'docs/topics')
| -rw-r--r-- | docs/topics/signals.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/topics/signals.txt b/docs/topics/signals.txt index 346d47d179..d4d79511be 100644 --- a/docs/topics/signals.txt +++ b/docs/topics/signals.txt @@ -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 |
