summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhanush <dhanush18245@gmail.com>2022-09-09 17:04:14 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-09-09 13:34:44 +0200
commit148d60de741e16b5185fb517fc24c6bf5e5f705e (patch)
tree7891b8a829dca749a5229ca909832d5af7b6cf3d
parente0f14d83898ee7d0d3180eb96214d8fcdf82cc1d (diff)
[4.1.x] Corrected example of redundant all() in docs.
Backport of 6df9398cce063874ae4d59db126d4adacb0fa8d3 from main
-rw-r--r--docs/topics/db/aggregation.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index 42be569cb4..d871c548e2 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -111,7 +111,7 @@ belong to this ``QuerySet``. This is done by appending an ``aggregate()``
clause onto the ``QuerySet``::
>>> from django.db.models import Avg
- >>> Book.objects.aggregate(Avg('price'))
+ >>> Book.objects.all().aggregate(Avg('price'))
{'price__avg': 34.35}
The ``all()`` is redundant in this example, so this could be simplified to::