1
0
mirror of https://github.com/django/django.git synced 2025-10-25 22:56:12 +00:00

magic-removal: Implemented hook for custom managers

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1647 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2005-12-14 18:49:48 +00:00
parent af96c19be2
commit e18d87f84e
3 changed files with 45 additions and 20 deletions

View File

@@ -83,4 +83,9 @@ AttributeError: type object 'Book' has no attribute 'objects'
[Corvette, Neon]
>>> Car.fast_cars.get_list()
[Corvette]
# Each model class gets a "_default_manager" attribute, which is a reference
# to the first manager defined in the class. In this case, it's "cars".
>>> Car._default_manager.get_list(order_by=('name',))
[Corvette, Neon]
"""