1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Removed "Don't do that" from docs and error messages.

It's slightly aggressive and doesn't explain itself.
This commit is contained in:
Adam Johnson
2020-01-05 10:04:51 +00:00
committed by Mariusz Felisiak
parent 1487f16f2d
commit 2ea3fb3e63
5 changed files with 14 additions and 20 deletions

View File

@@ -228,9 +228,8 @@ model. In those situations, Django has to be able to see all the objects for
the model it is fetching, so that *anything* which is referred to can be
retrieved.
If you override the ``get_queryset()`` method and filter out any rows, Django
will return incorrect results. Don't do that. A manager that filters results
in ``get_queryset()`` is not appropriate for use as a base manager.
Therefore, you should not override ``get_queryset()`` to filter out any rows.
If you do so, Django will return incomplete results.
.. _calling-custom-queryset-methods-from-manager: