mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Fixed #26267 -- Fixed BoundField to reallow slices of subwidgets.
This commit is contained in:
@@ -60,7 +60,7 @@ class BoundField(object):
|
||||
def __getitem__(self, idx):
|
||||
# Prevent unnecessary reevaluation when accessing BoundField's attrs
|
||||
# from templates.
|
||||
if not isinstance(idx, six.integer_types):
|
||||
if not isinstance(idx, six.integer_types + (slice,)):
|
||||
raise TypeError
|
||||
return list(self.__iter__())[idx]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user