#19717 closed Cleanup/optimization (fixed)
Inconsistent documentation: refers to a "root QuerySet", which is really a Manager instance.
Reported by: | 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 , 12 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 12 years ago
I have worked on a branch: https://github.com/jpic/django/tree/ticket_19717
This is the initial commit: https://github.com/jpic/django/commit/846def1adad702a72c6fbe0b29fc8f39c4ab05e2
And this is a pull request: https://github.com/django/django/pull/732
comment:3 by , 12 years ago
Cc: | added |
---|---|
Has patch: | set |
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.