Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…d timo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12163 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ddd6f28cac9839ec1f98a1b591e8f8397cf77ce4 1 parent 665ac87
Adrian Holovaty authored January 10, 2010

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  docs/ref/models/querysets.txt
6  docs/ref/models/querysets.txt
@@ -1317,7 +1317,11 @@ extract two field values, where only one is expected::
1317 1317
 
1318 1318
         values = Blog.objects.filter(
1319 1319
                 name__contains='Cheddar').values_list('pk', flat=True)
1320  
-        entries = Entry.objects.filter(blog__in=values)
  1320
+        entries = Entry.objects.filter(blog__in=list(values))
  1321
+
  1322
+    Note the ``list()`` call around the Blog ``QuerySet`` to force execution of
  1323
+    the first query. Without it, a nested query would be executed, because 
  1324
+    :ref:`querysets-are-lazy`.
1321 1325
 
1322 1326
 gt
1323 1327
 ~~

0 notes on commit ddd6f28

Please sign in to comment.
Something went wrong with that request. Please try again.