mirror of
https://github.com/django/django.git
synced 2025-03-31 19:46:42 +00:00
Fixed typo in docs/ref/models/querysets.txt.
Removed assignment in example for Blog annotation to match shown result.
This commit is contained in:
parent
b126f69416
commit
addbc90049
@ -2769,7 +2769,7 @@ number of authors that have contributed blog entries:
|
|||||||
.. code-block:: pycon
|
.. code-block:: pycon
|
||||||
|
|
||||||
>>> from django.db.models import Count
|
>>> from django.db.models import Count
|
||||||
>>> q = Blog.objects.aggregate(Count("entry"))
|
>>> Blog.objects.aggregate(Count("entry"))
|
||||||
{'entry__count': 16}
|
{'entry__count': 16}
|
||||||
|
|
||||||
By using a keyword argument to specify the aggregate function, you can
|
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
|
.. code-block:: pycon
|
||||||
|
|
||||||
>>> q = Blog.objects.aggregate(number_of_entries=Count("entry"))
|
>>> Blog.objects.aggregate(number_of_entries=Count("entry"))
|
||||||
{'number_of_entries': 16}
|
{'number_of_entries': 16}
|
||||||
|
|
||||||
For an in-depth discussion of aggregation, see :doc:`the topic guide on
|
For an in-depth discussion of aggregation, see :doc:`the topic guide on
|
||||||
|
Loading…
x
Reference in New Issue
Block a user