1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Removed the only_installed argument of Apps.get_models.

Refs #15903, #15866, #15850.
This commit is contained in:
Aymeric Augustin
2013-12-28 18:27:33 +01:00
parent ba7206cd81
commit 9f13c33281
4 changed files with 15 additions and 42 deletions

View File

@@ -593,6 +593,10 @@ methods are only referring to fields or other items in ``model._meta``.
App-loading changes
~~~~~~~~~~~~~~~~~~~
You should make sure that your project doesn't import models from applications
that aren't in :setting:`INSTALLED_APPS`. Relations involving such models may
not be created properly.
Subclasses of :class:`~django.core.management.AppCommand` must now implement a
:meth:`~django.core.management.AppCommand.handle_app_config` method instead of
``handle_app()``. This method receives an :class:`~django.apps.AppConfig` instance.
@@ -609,8 +613,8 @@ period. In addition, the following changes take effect immediately:
* ``get_model`` raises :exc:`~exceptions.LookupError` instead of returning
``None`` when no model is found.
* The ``only_installed`` and ``seed_cache`` arguments of ``get_model`` no
longer exist.
* The ``only_installed`` argument of ``get_model`` and ``get_models`` no
longer exists, nor does the ``seed_cache`` argument of ``get_model``.
While the new implementation is believed to be more robust, regressions cannot
be ruled out, especially during the import sequence. Circular imports that