Fixed #36665 -- Improved manager usage guidance in docs/topics/db/optimization.txt.
Some checks are pending
Docs / lint-docs (push) Waiting to run
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.14 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run

This commit is contained in:
Segni Mekonnen 2025-10-14 15:28:39 -05:00 committed by Jacob Walls
parent 56977b466c
commit b1e0262c9f

View file

@ -226,8 +226,9 @@ and :meth:`~django.db.models.query.QuerySet.prefetch_related`. Understand their
documentation thoroughly and apply them where needed.
It may be useful to apply these methods in :doc:`managers and default managers
</topics/db/managers>`. Be aware when your manager is and is not used;
sometimes this is tricky so don't make assumptions.
</topics/db/managers>`. Be aware when your manager is and is not used; for
example, related object access :ref:`uses the base manager
<managers-for-related-objects>` rather than the default manager.
Use ``prefetch_related_objects()``
----------------------------------