From 04780e8a25979645effeee0dacc279a8562ce675 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Tue, 23 Feb 2016 15:39:20 -0800 Subject: [1.9.x] Fixed #26267 -- Fixed BoundField to reallow slices of subwidgets. Backport of b41268135995cef46d40e550f9301fab20cf330d from master --- django/forms/boundfield.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/forms') 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] -- cgit v1.3