diff options
| author | Maarten <mzaanen@users.noreply.github.com> | 2015-09-05 12:35:58 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-05 10:20:36 -0400 |
| commit | c06953e8f976fc4742773144456f8b7c9e37679d (patch) | |
| tree | adbb3193909e7822b938c5096541a1efe903fa77 /docs | |
| parent | e060d57e9a7256eccf8f0376c8a4cd32d1a8feff (diff) | |
[1.8.x] Fixed #25355 -- Made two tweaks to docs/topics/db/aggregation.txt.
Backport of fe58d96e50e33b05f2a45f1493eca39ec9b3d030 from master
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/db/aggregation.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt index 409f58aa4c..65a1eb7ee6 100644 --- a/docs/topics/db/aggregation.txt +++ b/docs/topics/db/aggregation.txt @@ -73,7 +73,7 @@ In a hurry? Here's how to do common aggregate queries, assuming the models above {'price_per_page': 0.4470664529184653} # All the following queries involve traversing the Book<->Publisher - # many-to-many relationship backward + # foreign key relationship backwards. # Each publisher, each with a count of books as a "num_books" attribute. >>> from django.db.models import Count @@ -242,7 +242,7 @@ price field of the book model to produce a minimum and maximum value. The same rules apply to the ``aggregate()`` clause. If you wanted to know the lowest and highest price of any book that is available for sale -in a store, you could use the aggregate:: +in any of the stores, you could use the aggregate:: >>> Store.objects.aggregate(min_price=Min('books__price'), max_price=Max('books__price')) |
