--
Ticket URL: <https://code.djangoproject.com/ticket/25201>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* owner: nobody => andersonresende
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:1>
* has_patch: 1 => 0
* easy: 1 => 0
Comment:
ticket:24863#comment:10 might solve this. By the way, if you mean to
propose a patch, I don't see it.
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:2>
* stage: Unreviewed => Accepted
Comment:
I think the general idea is accepted even if the exact API needs to be
worked out.
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:3>
* cc: loic (added)
Comment:
Loic, can we close this in light of your PR to
[https://github.com/django/django/pull/6175 refactor manager inheritance]
(and deprecate `use_for_related_fields`)?
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:4>
Comment (by loic):
Indeed, but maybe we should let the commit messages close this ticket? Not
counting the chickens before they're hatched kinda thing?
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:5>
* keywords: => use_for_related_fields
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:6>
Comment (by loic):
[https://github.com/django/django/pull/6175#issuecomment-219451336 PR6175]
deprecates `use_for_related_fields`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:7>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"ed0ff913c648b16c4471fc9a9441d1ee48cb5420" ed0ff91]:
{{{
#!CommitTicketReference repository=""
revision="ed0ff913c648b16c4471fc9a9441d1ee48cb5420"
Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify
models' default and base managers.
This deprecates use_for_related_fields.
Old API:
class CustomManager(models.Model):
use_for_related_fields = True
class Model(models.Model):
custom_manager = CustomManager()
New API:
class Model(models.Model):
custom_manager = CustomManager()
class Meta:
base_manager_name = 'custom_manager'
Refs #20932, #25897.
Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25201#comment:8>