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
This commit is contained in:
parent
665ac8779b
commit
ddd6f28cac
|
@ -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
|
||||
~~
|
||||
|
|
Loading…
Reference in New Issue