浏览代码

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

Éric Araujo 10 年之前
父节点
当前提交
5842d8eba4
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      docs/topics/db/managers.txt

+ 2 - 5
docs/topics/db/managers.txt

@@ -296,9 +296,6 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
 ``QuerySet`` methods::
 
     class BaseManager(models.Manager):
-        def __init__(self, *args, **kwargs):
-            ...
-
         def manager_only_method(self):
             return
 
@@ -307,14 +304,14 @@ returns a *subclass* of your base ``Manager`` with a copy of the custom
             return
 
     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::
 
     CustomManager = BaseManager.from_queryset(CustomQueryset)
 
     class MyModel(models.Model):
-        objects = CustomManager(*args, **kwargs)
+        objects = CustomManager()
 
 .. _custom-managers-and-inheritance: