Changeset 7094
- Timestamp:
- 02/07/08 22:21:39 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/django/db/models/query.py
r7092 r7094 79 79 # need to fill it out a bit more. 80 80 if isinstance(k, slice): 81 bound = k.stop 81 if k.stop is not None: 82 # Some people insist on passing in strings here. 83 bound = int(k.stop) 84 else: 85 bound = None 82 86 else: 83 87 bound = k + 1 … … 88 92 if isinstance(k, slice): 89 93 qs = self._clone() 90 qs.query.set_limits(k.start, k.stop) 94 if k.start is not None: 95 start = int(k.start) 96 else: 97 start = None 98 if k.stop is not None: 99 stop = int(k.stop) 100 else: 101 stop = None 102 qs.query.set_limits(start, stop) 91 103 return k.step and list(qs)[::k.step] or qs 92 104 try:
