0
0
mirror of https://github.com/django/django.git synced 2024-11-22 11:57:34 +01:00
django/tests/many_to_one
Loïc Bistuer ed0ff913c6 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.
2016-05-17 12:07:22 +07:00
..
__init__.py
models.py
tests.py Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers. 2016-05-17 12:07:22 +07:00