mirror of
https://github.com/django/django.git
synced 2025-09-30 05:55:01 +00:00
magic-removal: Added small comment for ManagerDescriptor
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2162 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f925d89d11
commit
50e17688b0
1 changed files with 2 additions and 0 deletions
|
@ -174,6 +174,8 @@ class Manager(QuerySet):
|
|||
return [typecast_timestamp(str(row[0])) for row in cursor.fetchall()]
|
||||
|
||||
class ManagerDescriptor(object):
|
||||
# This class ensures managers aren't accessible via model instances.
|
||||
# For example, Poll.objects works, but poll_obj.objects raises AttributeError.
|
||||
def __init__(self, manager):
|
||||
self.manager = manager
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue