Skip to content

Commit

Permalink
Fixed #10039 -- More typos in aggregation docs. Seriously, people, no…
Browse files Browse the repository at this point in the history
…w you're just making me look bad :-) Thanks to ElliottM, and to Erich Holscher for a separate report that I've piggybacked on this checkin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9754 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Jan 15, 2009
1 parent bf710bd commit b3dd0b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/topics/db/aggregation.txt
Expand Up @@ -105,7 +105,7 @@ When an ``annotate()`` clause is specified, each object in the ``QuerySet``
will be annotated with the specified values. will be annotated with the specified values.


The syntax for these annotations is identical to that used for the The syntax for these annotations is identical to that used for the
``aggregate()`` clause. Each argument to ``annotate()`` describes and ``aggregate()`` clause. Each argument to ``annotate()`` describes an
aggregate that is to be calculated. For example, to annotate Books with aggregate that is to be calculated. For example, to annotate Books with
the number of authors:: the number of authors::


Expand Down Expand Up @@ -155,7 +155,7 @@ related value.
For example, to find the price range of books offered in each store, For example, to find the price range of books offered in each store,
you could use the annotation:: you could use the annotation::


>>> Store.objects.annotate(min_price=Min('books__price'), max_price=Min('books__price')) >>> Store.objects.annotate(min_price=Min('books__price'), max_price=Max('books__price'))


This tells Django to retrieve the Store model, join (through the This tells Django to retrieve the Store model, join (through the
many-to-many relationship) with the Book model, and aggregate on the many-to-many relationship) with the Book model, and aggregate on the
Expand Down

0 comments on commit b3dd0b5

Please sign in to comment.