1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range

This commit is contained in:
Michael Hall
2014-12-13 06:04:36 -07:00
committed by Tim Graham
parent a5499b0916
commit 895dc880eb
27 changed files with 95 additions and 94 deletions

View File

@@ -9,7 +9,7 @@ from django.utils.encoding import python_2_unicode_compatible
from django.utils.functional import cached_property
from django.utils.safestring import mark_safe
from django.utils import six
from django.utils.six.moves import xrange
from django.utils.six.moves import range
from django.utils.translation import ungettext, ugettext as _
@@ -138,7 +138,7 @@ class BaseFormSet(object):
Instantiate forms at first property access.
"""
# DoS protection is included in total_form_count()
forms = [self._construct_form(i) for i in xrange(self.total_form_count())]
forms = [self._construct_form(i) for i in range(self.total_form_count())]
return forms
def _construct_form(self, i, **kwargs):