diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-21 11:42:00 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-03-21 11:42:00 +0000 |
| commit | 7388d016805c6b5416aca224b0964a8a63fa0a3f (patch) | |
| tree | 9e71abfb620c659088b9d4ab115562480a22212f /tests | |
| parent | e401ff8ff83d2435428d4ac9a89b5dfc3e67d616 (diff) | |
queryset-refactor: Added support for cross-relation values() queries when
extra(select=...) was present (previously, it only worked without extra()).
Also, better error reporting for values() queries with bad field names.
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/lookup/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py index 5cff48ac51..a18be968aa 100644 --- a/tests/modeltests/lookup/models.py +++ b/tests/modeltests/lookup/models.py @@ -162,7 +162,7 @@ True >>> Article.objects.extra(select={'id_plus_one': 'id + 1'}).values('id', 'id_plus_two') Traceback (most recent call last): ... -FieldDoesNotExist: Article has no field named 'id_plus_two' +FieldError: Cannot resolve keyword 'id_plus_two' into field. Choices are: headline, id, id_plus_one, pub_date # If you don't specify field names to values(), all are returned. >>> list(Article.objects.filter(id=5).values()) == [{'id': 5, 'headline': 'Article 5', 'pub_date': datetime(2005, 8, 1, 9, 0)}] |
