mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Fixed #12806 -- Added an implementation of RawQuerySet.__getitem__. Thanks, Bruno Renié.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1334,6 +1334,9 @@ class RawQuerySet(object):
|
||||
def __repr__(self):
|
||||
return "<RawQuerySet: %r>" % (self.raw_query % self.params)
|
||||
|
||||
def __getitem__(self, k):
|
||||
return list(self)[k]
|
||||
|
||||
@property
|
||||
def db(self):
|
||||
"Return the database that will be used if this query is executed now"
|
||||
|
||||
Reference in New Issue
Block a user