Removed non-existent reference to args/kwargs in manager docs.

This commit is contained in:
Éric Araujo 2014-07-01 14:20:54 -04:00 committed by Tim Graham
parent e9249bc20b
commit 5842d8eba4
1 changed files with 2 additions and 5 deletions

View File

@ -296,9 +296,6 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
``QuerySet`` methods:: ``QuerySet`` methods::
class BaseManager(models.Manager): class BaseManager(models.Manager):
def __init__(self, *args, **kwargs):
...
def manager_only_method(self): def manager_only_method(self):
return return
@ -307,14 +304,14 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
return return
class MyModel(models.Model): class MyModel(models.Model):
objects = BaseManager.from_queryset(CustomQueryset)(*args, **kwargs) objects = BaseManager.from_queryset(CustomQueryset)()
You may also store the generated class into a variable:: You may also store the generated class into a variable::
CustomManager = BaseManager.from_queryset(CustomQueryset) CustomManager = BaseManager.from_queryset(CustomQueryset)
class MyModel(models.Model): class MyModel(models.Model):
objects = CustomManager(*args, **kwargs) objects = CustomManager()
.. _custom-managers-and-inheritance: .. _custom-managers-and-inheritance: