Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #10139 -- Clarified that slicing an evaluated QuerySet returns …

…a list, not a QuerySet. Thanks ori for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f0d467675040dbb979015d97adba449dc7fd02ad 1 parent 905e33f
Aymeric Augustin aaugustin authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 docs/ref/models/querysets.txt
9 docs/ref/models/querysets.txt
View
@@ -32,10 +32,11 @@ You can evaluate a ``QuerySet`` in the following ways:
print e.headline
* **Slicing.** As explained in :ref:`limiting-querysets`, a ``QuerySet`` can
- be sliced, using Python's array-slicing syntax. Usually slicing a
- ``QuerySet`` returns another (unevaluated) ``QuerySet``, but Django will
- execute the database query if you use the "step" parameter of slice
- syntax.
+ be sliced, using Python's array-slicing syntax. Slicing an unevaluated
+ ``QuerySet`` usually returns another unevaluated ``QuerySet``, but Django
+ will execute the database query if you use the "step" parameter of slice
+ syntax, and will return a list. Slicing a ``QuerySet`` that has been
+ evaluated (partially or fully) also returns a list.
* **Pickling/Caching.** See the following section for details of what
is involved when `pickling QuerySets`_. The important thing for the
Please sign in to comment.
Something went wrong with that request. Please try again.