1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

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

@@ -170,6 +170,12 @@ these changes.
* ``allow_syncdb`` on database routers will no longer automatically become
``allow_migrate``.
* All models will need to be defined inside an installed application or
declare an explicit :attr:`~django.db.models.Options.app_label`.
Furthermore, it won't be possible to import them before their application
is loaded. In particular, it won't be possible to import models inside
the root package of their application.
* If models are organized in a package, Django will no longer look for
:ref:`initial SQL data<initial-sql>` in ``myapp/models/sql/``. Move your
custom SQL files to ``myapp/sql/``.