mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Added require_ready argument to get_model methods.
This allows bringing back the behavior of Django < 1.7. Also fixed the check for the app registry being ready in AppConfig.get_model(s), which was inconsistent with the equivalent check in Apps.get_model(s). That part is a backwards-incompatible change.
This commit is contained in:
committed by
Tim Graham
parent
fd748c42a9
commit
625cd5bcb3
@@ -584,7 +584,8 @@ Miscellaneous
|
||||
: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.
|
||||
without all their relations set up. If you need the old behavior of
|
||||
``get_model()``, set the ``require_ready`` argument to ``False``.
|
||||
|
||||
.. _deprecated-features-1.11:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user