Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#19717 closed Cleanup/optimization (fixed)

Inconsistent documentation: refers to a "root QuerySet", which is really a Manager instance.

Reported by: julien.aubert.mail@… Owned by: nobody
Component: Documentation Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: James Pic Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

https://docs.djangoproject.com/en/dev/topics/db/queries/#retrieving-objects

"The Manager is the main source of QuerySets for a model. It acts as a "root" QuerySet that describes all objects in the model's database table. For example, Blog.objects is the initial QuerySet that contains all Blog objects in the database."

further down

"(If Entry.objects is a QuerySet, why can't we just do Entry.objects? That's because Entry.objects, the root QuerySet, is a special case that cannot be evaluated. The all() method returns a QuerySet that can be evaluated.)"

Entry.objects is a Manager instance and not a QuerySet. To refer to a "root QuerySet" which really is a Manager instance does not help, just adds confusion. I would suggest to remove any reference to "root QuerySet" in all the doc.

Change History (5)

comment:1 by wim@…, 11 years ago

Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Accepted, agreed that we should call things by their proper names in order to avoid confusion. Thanks for the report! If you want to, you are welcome to deposit a patch.

comment:3 by James Pic, 11 years ago

Cc: James Pic added
Has patch: set

comment:4 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 64d0f89ab1dc6ef8a84814f567050fc063d67de2:

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

Thanks julien.aubert.mail@ for the report and James Pic for the patch.

comment:5 by Tim Graham <timograham@…>, 11 years ago

In 5d853db90e71691f2b6b0827b002b9d0edb38fd1:

[1.5.X] Fixed #19717 - Removed mentions of "root QuerySet" in docs.

Thanks julien.aubert.mail@ for the report and James Pic for the patch.

Backport of 64d0f89ab1 from master

Note: See TracTickets for help on using tickets.
Back to Top