mirror of
https://github.com/Hopiu/django.git
synced 2026-03-23 01:10:30 +00:00
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.
|
||
|---|---|---|
| .. | ||
| class.txt | ||
| conditional-expressions.txt | ||
| database-functions.txt | ||
| expressions.txt | ||
| fields.txt | ||
| index.txt | ||
| instances.txt | ||
| lookups.txt | ||
| meta.txt | ||
| options.txt | ||
| querysets.txt | ||
| relations.txt | ||