diff options
| author | Simon Charette <charette.s@gmail.com> | 2016-02-18 22:37:11 -0500 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2016-03-02 16:10:18 -0500 |
| commit | c92123cc1dceeb800b3b8900e2e530ed19d78863 (patch) | |
| tree | fc1e57d990a7632e49a57beefabdaabb740df7eb /docs | |
| parent | 5d240b070d744f9a2f4cc3117306ea861d866019 (diff) | |
Fixed #26226 -- Made related managers honor the queryset used for prefetching their results.
Thanks Loïc for the suggested improvements and Tim for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/1.10.txt | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 2da4b6d6bb..e4a74abdf4 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -144,6 +144,9 @@ details on these changes. * The ``__search`` query lookup and the ``DatabaseOperations.fulltext_search_sql()`` method will be removed. +* The shim for supporting custom related manager classes without a + ``_apply_rel_filters()`` method will be removed. + .. _deprecation-removed-in-1.10: 1.10 diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 1f2ddd9457..d935ab8c8f 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -762,6 +762,17 @@ features, is deprecated. Replace it with a custom lookup:: models.CharField.register_lookup(Search) models.TextField.register_lookup(Search) +Custom manager classes available through ``prefetch_related`` must define a ``_apply_rel_filters()`` method +----------------------------------------------------------------------------------------------------------- + +If you defined a custom manager class available through +:meth:`~django.db.models.query.QuerySet.prefetch_related` you must make sure +it defines a ``_apply_rel_filters()`` method. + +This method must accept a :class:`~django.db.models.query.QuerySet` instance +as its single argument and return a filtered version of the queryset for the +model instance the manager is bound to. + Miscellaneous ------------- |
