mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
Improved naming consistency in BaseManage.contribute_to_class().
Matches signatures of other contribute_to_class() methods.
This commit is contained in:
parent
c3b1e41288
commit
0b4fe82c74
@ -109,13 +109,13 @@ class BaseManager:
|
|||||||
**cls._get_queryset_methods(queryset_class),
|
**cls._get_queryset_methods(queryset_class),
|
||||||
})
|
})
|
||||||
|
|
||||||
def contribute_to_class(self, model, name):
|
def contribute_to_class(self, cls, name):
|
||||||
self.name = self.name or name
|
self.name = self.name or name
|
||||||
self.model = model
|
self.model = cls
|
||||||
|
|
||||||
setattr(model, name, ManagerDescriptor(self))
|
setattr(cls, name, ManagerDescriptor(self))
|
||||||
|
|
||||||
model._meta.add_manager(self)
|
cls._meta.add_manager(self)
|
||||||
|
|
||||||
def _set_creation_counter(self):
|
def _set_creation_counter(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user