Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #10947 -- Fixed error in __in documentation. Thanks, julianb an…

…d timo

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ddd6f28cac9839ec1f98a1b591e8f8397cf77ce4 1 parent 665ac87
@adrianholovaty adrianholovaty authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 docs/ref/models/querysets.txt
6 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`.
Please sign in to comment.
Something went wrong with that request. Please try again.