mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +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
@ -174,6 +174,8 @@ class Manager(QuerySet):
|
|||||||
return [typecast_timestamp(str(row[0])) for row in cursor.fetchall()]
|
return [typecast_timestamp(str(row[0])) for row in cursor.fetchall()]
|
||||||
|
|
||||||
class ManagerDescriptor(object):
|
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):
|
def __init__(self, manager):
|
||||||
self.manager = manager
|
self.manager = manager
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user