[1.10.x] Fixed #26749 -- Preserved behavior of use_for_related_field during deprecation.

Backport of f4afb85d7e from master
This commit is contained in:
Julien Hartmann 2016-06-23 17:10:52 +07:00 committed by Tim Graham
parent 4b6560f5a9
commit 39c25b772b
3 changed files with 102 additions and 7 deletions

View file

@ -1091,6 +1091,12 @@ class to override the manager from the concrete model, or you'll set the
model's ``Meta.manager_inheritance_from_future=True`` option to opt-in to the
new inheritance behavior.
During the deprecation period, ``use_for_related_fields`` will be honored and
raise a warning, even if a ``base_manager_name`` is set. This allows
third-party code to preserve legacy behavior while transitioning to the new
API. The warning can be silenced by setting
``silence_use_for_related_fields_deprecation=True`` on the manager.
Miscellaneous
-------------