1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

[py3] Replaced basestring by six.string_types.

This commit is contained in:
Aymeric Augustin
2012-07-20 14:22:00 +02:00
parent cacd845996
commit 3cb2457f46
73 changed files with 230 additions and 150 deletions

View File

@@ -7,6 +7,7 @@ from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import smart_unicode
from django.utils.ipv6 import is_valid_ipv6_address
from django.utils import six
# These values, if given to validate(), will trigger the self.required check.
EMPTY_VALUES = (None, '', [], (), {})
@@ -25,7 +26,7 @@ class RegexValidator(object):
self.code = code
# Compile the regex if it was not passed pre-compiled.
if isinstance(self.regex, basestring):
if isinstance(self.regex, six.string_types):
self.regex = re.compile(self.regex)
def __call__(self, value):