mirror of
				https://github.com/django/django.git
				synced 2025-10-31 01:25:32 +00:00 
			
		
		
		
	[1.7.x] Removed non-existent reference to args/kwargs in manager docs.
Backport of 5842d8eba4 from master
			
			
This commit is contained in:
		| @@ -300,9 +300,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 | ||||
|  | ||||
| @@ -311,14 +308,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: | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user