Deprecated importing a model before loading its application.

Refs #21719, #21680.
This commit is contained in:
Aymeric Augustin 2014-01-10 23:06:19 +01:00
parent 81bb8d1220
commit 3326a412cc
5 changed files with 40 additions and 5 deletions

View file

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