#5115: ORM does not support query set subscription with long numbers
--------------------------------------------+-------------------------------
Reporter: zboczuch <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: Core framework
Version: SVN | Keywords: orm query set slice
indexing
Stage: Unreviewed | Has_patch: 0
--------------------------------------------+-------------------------------
{{{
> from app.models import foo
> foo.objects.all()[2L]
<type 'exceptions.TypeError'>
}}}
Longs are allowed in slices. I think the problem is in
django/db/models/query.py:
{{
def __getitem__(self, k):
"Retrieve an item or slice from the set of results."
if not isinstance(k, (slice, int)):
}}
"long" should be added to the type list above.
--
Ticket URL: <http://code.djangoproject.com/ticket/5115>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---