• Loïc Bistuer's avatar
    Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models'… · ed0ff913
    Loïc Bistuer yazdı
    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.
    ed0ff913
Adı
Son kayıt (commit)
Son güncelleme
..
_images Loading commit data...
contributing Loading commit data...
deprecation.txt Loading commit data...
git.txt Loading commit data...
howto-release-django.txt Loading commit data...
index.txt Loading commit data...
mailing-lists.txt Loading commit data...
organization.txt Loading commit data...
release-process.txt Loading commit data...
roles.txt Loading commit data...
security.txt Loading commit data...
team.txt Loading commit data...