Opened 3 years ago

Closed 3 years ago

Last modified 3 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: jpic 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 Changed 3 years ago by wim@…

  • Easy pickings set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/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 Changed 3 years ago by jpic

  • Cc jpic added
  • Has patch set

comment:4 Changed 3 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from new to closed

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 Changed 3 years ago by Tim Graham <timograham@…>

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