From d66bda60590daabe21f60a532a613a31a10fedbd Mon Sep 17 00:00:00 2001 From: wrwrwr Date: Thu, 27 Nov 2014 11:22:23 -0500 Subject: Added notes on registering signals in ready() and using dispatch_uid. Refs #23641. --- docs/ref/signals.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index d1f5f3c78f..b41b3f63dd 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -509,6 +509,15 @@ For example, you could register a callback in an def ready(self): post_migrate.connect(my_callback, sender=self) +.. note:: + + If you provide an :class:`~django.apps.AppConfig` instance as the sender + argument, please ensure that the signal is registered in + :meth:`~django.apps.AppConfig.ready`. ``AppConfig``\s are recreated for + tests that run with a modified set of :setting:`INSTALLED_APPS` (such as + when settings are overridden) and such signals should be connected for each + new ``AppConfig`` instance. + post_syncdb ----------- -- cgit v1.3