diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 17:25:44 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2010-01-10 17:25:44 +0000 |
| commit | ddd6f28cac9839ec1f98a1b591e8f8397cf77ce4 (patch) | |
| tree | 80abd734b29b246e5c40f804099be9a173b8c218 /docs/ref | |
| parent | 665ac8779bf313c6d0e179c78b6c68ca59ad4548 (diff) | |
Fixed #10947 -- Fixed error in __in documentation. Thanks, julianb and timo
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/models/querysets.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index a660585888..5c9d33bc83 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -1317,7 +1317,11 @@ extract two field values, where only one is expected:: values = Blog.objects.filter( name__contains='Cheddar').values_list('pk', flat=True) - entries = Entry.objects.filter(blog__in=values) + entries = Entry.objects.filter(blog__in=list(values)) + + Note the ``list()`` call around the Blog ``QuerySet`` to force execution of + the first query. Without it, a nested query would be executed, because + :ref:`querysets-are-lazy`. gt ~~ |
