diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-02-17 10:17:29 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-02-17 10:17:29 +0000 |
| commit | e83f81de8c6ec5497488ae7787fd2e392c9ea704 (patch) | |
| tree | 6e45b770e6dc33b38dd84bc5657a80e9296b5f31 /docs/ref | |
| parent | fd28d04c39f83672f674aa2d83557db36a70b4b5 (diff) | |
Clarified some documentation on the use of the aggregate() query modifier, following suggestions on IRC. Thanks to Tai Lee for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index d8d01467b9..a6ea916e87 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -991,7 +991,7 @@ generated for them based upon the name of the aggregate function and the model field that is being aggregated. For example, if you were manipulating blog entries, you may want to know -the average number of authors contributing to blog entries:: +the number of authors that have contributed blog entries:: >>> q = Blog.objects.aggregate(Count('entry')) {'entry__count': 16} @@ -1000,7 +1000,7 @@ By using a keyword argument to specify the aggregate function, you can control the name of the aggregation value that is returned:: >>> q = Blog.objects.aggregate(number_of_entries=Count('entry')) - {'number_of_entries': 2.34} + {'number_of_entries': 16} For an in-depth discussion of aggregation, see :ref:`the topic guide on Aggregation <topics-db-aggregation>`. |
