diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2016-10-06 10:20:22 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-10-06 10:22:40 -0400 |
| commit | 86ebc4e524574112ef1c6ec3ebece753a2a3771c (patch) | |
| tree | 4b8c8ebbc4c572151739f9102ae6a0e0ff638988 /docs | |
| parent | fbf59a29670dfc0e4e4371c27a366613550eb2d9 (diff) | |
[1.10.x] Documented AppRegistryNotReady.
Backport of 5d35181de4a9d693c4702680974b30db3035a0c9 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/applications.txt | 8 | ||||
| -rw-r--r-- | docs/ref/exceptions.txt | 9 |
2 files changed, 14 insertions, 3 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt index 2340951542..0811bdf75f 100644 --- a/docs/ref/applications.txt +++ b/docs/ref/applications.txt @@ -347,6 +347,8 @@ Application registry :exc:`ValueError` when called with a single argument that doesn't contain exactly one dot. +.. _app-loading-process: + Initialization process ====================== @@ -425,9 +427,9 @@ Troubleshooting Here are some common problems that you may encounter during initialization: -* ``AppRegistryNotReady`` This happens when importing an application - configuration or a models module triggers code that depends on the app - registry. +* :class:`~django.core.exceptions.AppRegistryNotReady`: This happens when + importing an application configuration or a models module triggers code that + depends on the app registry. For example, :func:`~django.utils.translation.ugettext()` uses the app registry to look up translation catalogs in applications. To translate at diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt index c222010172..690b403142 100644 --- a/docs/ref/exceptions.txt +++ b/docs/ref/exceptions.txt @@ -12,6 +12,15 @@ Django Core Exceptions Django core exception classes are defined in ``django.core.exceptions``. +``AppRegistryNotReady`` +----------------------- + +.. exception:: AppRegistryNotReady + + This exception is raised when attempting to use models before the :ref:`app + loading process <app-loading-process>`, which initializes the ORM, is + complete. + ``ObjectDoesNotExist`` ---------------------- |
