1
0
mirror of https://github.com/django/django.git synced 2024-11-18 23:44:22 +00:00
django/docs/topics/db
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
..
examples Fixed #26595 -- Removed unnecessary save() in one_to_one.txt example. 2016-05-07 06:53:03 -04:00
aggregation.txt Refs #25136 -- Fixed nonexistent field reference in aggregation topic guide. 2016-04-27 15:16:00 -04:00
index.txt Refs #3254 -- Added full text search to contrib.postgres. 2016-04-22 10:44:37 +01:00
managers.txt Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers. 2016-05-17 12:07:22 +07:00
models.txt Fixed #20932, #25897 -- Streamlined manager inheritance. 2016-05-17 02:29:22 +07:00
multi-db.txt
optimization.txt Fixed #26438 -- Fixed multiple .objects typos in the docs. 2016-03-31 18:27:47 -04:00
queries.txt Refs #26021 -- Used hanging indentation in some doc examples. 2016-05-14 19:06:31 -04:00
search.txt Fixed #24938 -- Added PostgreSQL trigram support. 2016-05-13 12:38:21 -04:00
sql.txt
tablespaces.txt
transactions.txt