summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-01-23 11:12:06 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-01-23 11:12:06 +0000
commitf5ed27cf1f26a678869d91cbbfca24dc53e603e5 (patch)
treea5ba8ff47620108d41783faeccd162dfe8164685
parent0e15932be392ab56fa0087f9c13b234af7749e2e (diff)
Fixed #10052 -- Added import line for other aggregates used in examples. Thanks to Tyler Brownell <tyler@bluefoxstudio.ca> for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--docs/topics/db/aggregation.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/topics/db/aggregation.txt b/docs/topics/db/aggregation.txt
index 9ee39fc081..51942d9a1c 100644
--- a/docs/topics/db/aggregation.txt
+++ b/docs/topics/db/aggregation.txt
@@ -88,6 +88,7 @@ If you want to generate more than one aggregate, you just add another
argument to the ``aggregate()`` clause. So, if we also wanted to know
the maximum and minimum price of all books, we would issue the query::
+ >>> from django.db.models import Avg, Max, Min, Count
>>> Book.objects.aggregate(Avg('price'), Max('price'), Min('price'))
{'price__avg': 34.35, 'price__max': Decimal('81.20'), 'price__min': Decimal('12.99')}