mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #24215 -- Refactored lazy model operations
This adds a new method, Apps.lazy_model_operation(), and a helper function, lazy_related_operation(), which together supersede add_lazy_relation() and make lazy model operations the responsibility of the App registry. This system no longer uses the class_prepared signal.
This commit is contained in:
parent
0f6f80c2e7
commit
720ff740e7
10 changed files with 231 additions and 165 deletions
|
@ -30,6 +30,8 @@ details on these changes.
|
|||
|
||||
* ``Field.remote_field.to`` attribute will be removed.
|
||||
|
||||
* ``django.db.models.fields.add_lazy_relation`` will be removed.
|
||||
|
||||
.. _deprecation-removed-in-2.0:
|
||||
|
||||
2.0
|
||||
|
|
|
@ -372,6 +372,8 @@ Miscellaneous
|
|||
:class:`~django.forms.SelectDateWidget` in ``django.forms.widgets``
|
||||
(or simply ``django.forms``) instead.
|
||||
|
||||
* Private API ``django.db.models.fields.add_lazy_relation()`` is deprecated.
|
||||
|
||||
.. removed-features-1.9:
|
||||
|
||||
Features removed in 1.9
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue