#23597 closed Bug (fixed)
docs: specifying SingleObjectMixin.model uses default manager, not necessarily objects
Reported by: | Ismail Badawi | Owned by: | Ismail Badawi |
---|---|---|---|
Component: | Documentation | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
This is a tiny thing I came across. The docs for SingleObjectMixin.model and MultipleObjectMixin.model both say:
The model that this view will display data for. Specifying
model = Foo
is effectively the same as specifyingqueryset = Foo.objects.all()
.
But peeking at the code, this isn't quite true -- in both cases (here and here), the default manager is used, which is not necessarily objects
.
Is it worth making this more precise? The docs don't mention default managers very often.
Change History (6)
comment:1 by , 10 years ago
Easy pickings: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
Has patch: | set |
---|
comment:4 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Pull request: https://github.com/django/django/pull/3309