summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Musketa <daniel@musketa.de>2019-04-13 12:35:31 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-04-13 12:36:12 +0200
commitf5c1d02f13a0484f1c32caf1a0117f1e75a3dc8f (patch)
treea6f2ab68e508d2cc67cfada96e5429b03fec6299 /docs
parentbfe279293c0b9a2b4a463be76f33b2025add20b6 (diff)
[2.2.x] Fixed #30347 -- Fixed typo in docs/topics/db/aggregation.txt.
Backport of ba726067604ce5a8ca3919edf653496722b433ab from master
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/db/aggregation.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index e7d30b9d82..505b3adf91 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -354,8 +354,8 @@ If you need two annotations with two separate filters you can use the
``filter`` argument with any aggregate. For example, to generate a list of
authors with a count of highly rated books::
- >>> highly_rated = Count('books', filter=Q(books__rating__gte=7))
- >>> Author.objects.annotate(num_books=Count('books'), highly_rated_books=highly_rated)
+ >>> highly_rated = Count('book', filter=Q(book__rating__gte=7))
+ >>> Author.objects.annotate(num_books=Count('book'), highly_rated_books=highly_rated)
Each ``Author`` in the result set will have the ``num_books`` and
``highly_rated_books`` attributes.