From 3326a412ccde9f72e22a070a0b4d922048ed2286 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Fri, 10 Jan 2014 23:06:19 +0100 Subject: Deprecated importing a model before loading its application. Refs #21719, #21680. --- docs/ref/applications.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/ref') diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt index a44062808e..e496f24487 100644 --- a/docs/ref/applications.txt +++ b/docs/ref/applications.txt @@ -181,6 +181,13 @@ Methods as registering signals. It is called as soon as the registry is fully populated. + You cannot import models in modules that define application configuration + classes, but you can use :meth:`get_model` to access a model class by + name, like this:: + + def ready(self): + MyModel = self.get_model('MyModel') + Application registry ==================== -- cgit v1.3