summaryrefslogtreecommitdiff
path: root/tests/regressiontests/aggregation_regress/models.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-02-16 12:38:11 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-02-16 12:38:11 +0000
commit2b1bb716ff7552bf9f98653c172a573c380e4798 (patch)
tree0377aa4ab869a84ecdb06977c11bd6d71739da13 /tests/regressiontests/aggregation_regress/models.py
parentfb64ea78968714929a75514ecd55fb5af1093697 (diff)
Fixed #10248 -- Corrected handling of the GROUP BY clause when using a DateQuerySet. Thanks to Alex Gaynor for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/aggregation_regress/models.py')
-rw-r--r--tests/regressiontests/aggregation_regress/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/regressiontests/aggregation_regress/models.py b/tests/regressiontests/aggregation_regress/models.py
index 51648dada6..de913a0a9f 100644
--- a/tests/regressiontests/aggregation_regress/models.py
+++ b/tests/regressiontests/aggregation_regress/models.py
@@ -213,6 +213,10 @@ FieldError: Cannot resolve keyword 'foo' into field. Choices are: authors, conta
>>> books.all()
[<Book: Artificial Intelligence: A Modern Approach>, <Book: Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp>, <Book: Practical Django Projects>, <Book: Python Web Development with Django>, <Book: Sams Teach Yourself Django in 24 Hours>, <Book: The Definitive Guide to Django: Web Development Done Right>]
+# Regression for #10248 - Annotations work with DateQuerySets
+>>> Book.objects.annotate(num_authors=Count('authors')).filter(num_authors=2).dates('pubdate', 'day')
+[datetime.datetime(1995, 1, 15, 0, 0), datetime.datetime(2007, 12, 6, 0, 0)]
+
"""
}