From c31d7c48139260ccb72deda9b0033db0db86e84a Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 30 Dec 2013 13:24:24 +0100 Subject: Updated advice on connecting signals at startup. --- docs/ref/signals.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/signals.txt b/docs/ref/signals.txt index ece6990aa7..2e9f6ccea6 100644 --- a/docs/ref/signals.txt +++ b/docs/ref/signals.txt @@ -354,6 +354,12 @@ Sent whenever a model class has been "prepared" -- that is, once model has been defined and registered with Django's model system. Django uses this signal internally; it's not generally used in third-party applications. +Since this signal is sent during the app registry population process, and +:meth:`AppConfig.setup() ` runs after the app +registry is fully populated, receivers cannot be connected in that method. +One possibility is to connect them ``AppConfig.__init__()`` instead, taking +care not to import models or trigger calls to the app registry. + Arguments that are sent with this signal: ``sender`` -- cgit v1.3