mirror of
https://github.com/django/django.git
synced 2025-09-22 18:22:40 +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:
parent
349827996b
commit
c4699b0b8a
5 changed files with 35 additions and 2 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue