summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/applications.txt9
-rw-r--r--docs/releases/1.11.txt7
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt
index c289afcef9..110e5e867d 100644
--- a/docs/ref/applications.txt
+++ b/docs/ref/applications.txt
@@ -227,11 +227,16 @@ Methods
Returns an iterable of :class:`~django.db.models.Model` classes for this
application.
+ Requires the app registry to be fully populated.
+
.. method:: AppConfig.get_model(model_name)
Returns the :class:`~django.db.models.Model` with the given
- ``model_name``. Raises :exc:`LookupError` if no such model exists in this
- application. ``model_name`` is case-insensitive.
+ ``model_name``. ``model_name`` is case-insensitive.
+
+ Raises :exc:`LookupError` if no such model exists in this application.
+
+ Requires the app registry to be fully populated.
.. method:: AppConfig.ready()
diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt
index 27f7481fa6..8fd0795d67 100644
--- a/docs/releases/1.11.txt
+++ b/docs/releases/1.11.txt
@@ -579,6 +579,13 @@ Miscellaneous
* ``ConditionalGetMiddleware`` no longer sets the ``Date`` header as Web
servers set that header.
+* :meth:`~django.apps.AppConfig.get_model` and
+ :meth:`~django.apps.AppConfig.get_models` now raise
+ :exc:`~django.core.exceptions.AppRegistryNotReady` if they're called before
+ models of all applications have been loaded. Previously they only required
+ the target application's models to be loaded and thus could return models
+ without all their relations set up.
+
.. _deprecated-features-1.11:
Features deprecated in 1.11