summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2016-02-23 15:39:20 -0800
committerTim Graham <timograham@gmail.com>2016-02-24 07:03:24 -0500
commit04780e8a25979645effeee0dacc279a8562ce675 (patch)
tree51a79d93e692a4396464913e91e14f5579287108 /django/forms
parent5ca1d0a654aeb7ad655f565627b5b7eefc23d776 (diff)
[1.9.x] Fixed #26267 -- Fixed BoundField to reallow slices of subwidgets.
Backport of b41268135995cef46d40e550f9301fab20cf330d from master
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/boundfield.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/boundfield.py b/django/forms/boundfield.py
index bcfe2e2a2d..6567c4f08f 100644
--- a/django/forms/boundfield.py
+++ b/django/forms/boundfield.py
@@ -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]