summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authornessita <124304+nessita@users.noreply.github.com>2023-07-20 14:45:44 -0300
committerGitHub <noreply@github.com>2023-07-20 19:45:44 +0200
commitaddbc90049083f1d5f7ac138ed00111b71a75233 (patch)
tree1042249b4d0dada74430d41b06aaa03ff9ac849b /docs
parentb126f694160c4641e64e57dba6b022f06fbfa745 (diff)
Fixed typo in docs/ref/models/querysets.txt.
Removed assignment in example for Blog annotation to match shown result.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/querysets.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index 93193acfad..60df78d80b 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -2769,7 +2769,7 @@ number of authors that have contributed blog entries:
.. code-block:: pycon
>>> from django.db.models import Count
- >>> q = Blog.objects.aggregate(Count("entry"))
+ >>> Blog.objects.aggregate(Count("entry"))
{'entry__count': 16}
By using a keyword argument to specify the aggregate function, you can
@@ -2777,7 +2777,7 @@ control the name of the aggregation value that is returned:
.. code-block:: pycon
- >>> q = Blog.objects.aggregate(number_of_entries=Count("entry"))
+ >>> Blog.objects.aggregate(number_of_entries=Count("entry"))
{'number_of_entries': 16}
For an in-depth discussion of aggregation, see :doc:`the topic guide on