diff options
Diffstat (limited to 'django/utils/regex_helper.py')
| -rw-r--r-- | django/utils/regex_helper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py index 4b8ecea721..8953a21e95 100644 --- a/django/utils/regex_helper.py +++ b/django/utils/regex_helper.py @@ -7,6 +7,8 @@ should be good enough for a large class of URLS, however. """ from __future__ import unicode_literals +from django.utils import six + # Mapping of an escape character to a representative of that class. So, e.g., # "\w" is replaced by "x" in a reverse URL. A value of None means to ignore # this sequence. Any missing key is mapped to itself. @@ -302,7 +304,7 @@ def flatten_result(source): result_args = [[]] pos = last = 0 for pos, elt in enumerate(source): - if isinstance(elt, basestring): + if isinstance(elt, six.string_types): continue piece = ''.join(source[last:pos]) if isinstance(elt, Group): |
