mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
[1.8.x] Fixed a typo in the managers docs.
Backport of e03798a4ae6e0eca43c1b238dd96b3798aaeca81 from master
This commit is contained in:
parent
6914a716cb
commit
85a021b9cb
@ -309,11 +309,11 @@ 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)()
|
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()
|
objects = CustomManager()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user