Skip to content

Commit

Permalink
[4.2.x] Fixed typo in docs/ref/models/querysets.txt.
Browse files Browse the repository at this point in the history
Removed assignment in example for Blog annotation to match shown result.
Backport of addbc90 from main
  • Loading branch information
nessita authored and felixxm committed Jul 20, 2023
1 parent da92a97 commit c99d935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/ref/models/querysets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2830,15 +2830,15 @@ 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
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
Expand Down

0 comments on commit c99d935

Please sign in to comment.