> The model that this view will display data for. Specifying `model = Foo`
is effectively the same as specifying `queryset = Foo.objects.all()`.
But peeking at the code, this isn't quite true -- in both cases
([https://github.com/django/django/blob/8c581ff39475c1b3b25d60945cc1c73a7f8eb1be/django/views/generic/detail.py#L67-L68
here] and
[https://github.com/django/django/blob/8c581ff39475c1b3b25d60945cc1c73a7f8eb1be/django/views/generic/list.py#L37-L38
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/23597>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* easy: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:1>
* status: new => assigned
* owner: nobody => isbadawi
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:2>
* has_patch: 0 => 1
Comment:
Pull request: https://github.com/django/django/pull/3309
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"e501d4c505ede0c87c2d1a8667167314021489e2"]:
{{{
#!CommitTicketReference repository=""
revision="e501d4c505ede0c87c2d1a8667167314021489e2"
Fixed #23597 -- Clarified the manager that
{Single,Multiple}ObjectMixin.model uses.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"0aad1f1ea912e1c855c1ff9c0b89fa28d2035ca3"]:
{{{
#!CommitTicketReference repository=""
revision="0aad1f1ea912e1c855c1ff9c0b89fa28d2035ca3"
[1.6.x] Fixed #23597 -- Clarified the manager that
{Single,Multiple}ObjectMixin.model uses.
Backport of e501d4c505 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:5>
Comment (by Tim Graham <timograham@…>):
In [changeset:"e9609fb7a1758e5de10360d4f181a6e602658406"]:
{{{
#!CommitTicketReference repository=""
revision="e9609fb7a1758e5de10360d4f181a6e602658406"
[1.7.x] Fixed #23597 -- Clarified the manager that
{Single,Multiple}ObjectMixin.model uses.
Backport of e501d4c505 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23597#comment:6>