Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #19717 - Removed mentions of "root QuerySet" in docs.

Thanks julien.aubert.mail@ for the report and James Pic for the patch.
  • Loading branch information...
commit 64d0f89ab1dc6ef8a84814f567050fc063d67de2 1 parent 92837ae
Tim Graham authored February 18, 2013

Showing 1 changed file with 10 additions and 19 deletions. Show diff stats Hide diff stats

  1. 29  docs/topics/db/queries.txt
29  docs/topics/db/queries.txt
@@ -163,10 +163,9 @@ default. Access it directly via the model class, like so::
163 163
     "record-level" operations.
164 164
 
165 165
 The :class:`~django.db.models.Manager` is the main source of ``QuerySets`` for
166  
-a model. It acts as a "root" :class:`~django.db.models.query.QuerySet` that
167  
-describes all objects in the model's database table. For example,
168  
-``Blog.objects`` is the initial :class:`~django.db.models.query.QuerySet` that
169  
-contains all ``Blog`` objects in the database.
  166
+a model. For example, ``Blog.objects.all()`` returns a
  167
+:class:`~django.db.models.query.QuerySet` that contains all ``Blog`` objects in
  168
+the database.
170 169
 
171 170
 Retrieving all objects
172 171
 ----------------------
@@ -180,20 +179,13 @@ this, use the :meth:`~django.db.models.query.QuerySet.all` method on a
180 179
 The :meth:`~django.db.models.query.QuerySet.all` method returns a
181 180
 :class:`~django.db.models.query.QuerySet` of all the objects in the database.
182 181
 
183  
-(If ``Entry.objects`` is a :class:`~django.db.models.query.QuerySet`, why can't
184  
-we just do ``Entry.objects``?  That's because ``Entry.objects``, the root
185  
-:class:`~django.db.models.query.QuerySet`, is a special case that cannot be
186  
-evaluated. The :meth:`~django.db.models.query.QuerySet.all` method returns a
187  
-:class:`~django.db.models.query.QuerySet` that *can* be evaluated.)
188  
-
189  
-
190 182
 Retrieving specific objects with filters
191 183
 ----------------------------------------
192 184
 
193  
-The root :class:`~django.db.models.query.QuerySet` provided by the
194  
-:class:`~django.db.models.Manager` describes all objects in the database
195  
-table. Usually, though, you'll need to select only a subset of the complete set
196  
-of objects.
  185
+The :class:`~django.db.models.query.QuerySet` returned by
  186
+:meth:`~django.db.models.query.QuerySet.all` describes all objects in the
  187
+database table. Usually, though, you'll need to select only a subset of the
  188
+complete set of objects.
197 189
 
198 190
 To create such a subset, you refine the initial
199 191
 :class:`~django.db.models.query.QuerySet`, adding filter conditions. The two
@@ -216,10 +208,9 @@ so::
216 208
 
217 209
     Entry.objects.filter(pub_date__year=2006)
218 210
 
219  
-We don't have to add an :meth:`~django.db.models.query.QuerySet.all` --
220  
-``Entry.objects.all().filter(...)``. That would still work, but you only need
221  
-:meth:`~django.db.models.query.QuerySet.all` when you want all objects from the
222  
-root :class:`~django.db.models.query.QuerySet`.
  211
+With the default manager class, it is the same as::
  212
+
  213
+    Entry.objects.all().filter(pub_date__year=2006)
223 214
 
224 215
 .. _chaining-filters:
225 216
 

0 notes on commit 64d0f89

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