mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #23822 -- Added support for serializing model managers in migration
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin, Tim Graham, Carl Meyer, and others for their review and input.
This commit is contained in:
parent
e37ab311fc
commit
aa5ef0d4fc
28 changed files with 608 additions and 48 deletions
|
@ -60,9 +60,16 @@ class BaseCustomManager(models.Manager):
|
|||
def manager_only(self):
|
||||
return self.all()
|
||||
|
||||
|
||||
CustomManager = BaseCustomManager.from_queryset(CustomQuerySet)
|
||||
|
||||
|
||||
class DeconstructibleCustomManager(BaseCustomManager.from_queryset(CustomQuerySet)):
|
||||
|
||||
def __init__(self, a, b, c=1, d=2):
|
||||
super(DeconstructibleCustomManager, self).__init__(a)
|
||||
|
||||
|
||||
class FunPeopleManager(models.Manager):
|
||||
def get_queryset(self):
|
||||
return super(FunPeopleManager, self).get_queryset().filter(fun=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue