mirror of https://github.com/django/django.git
Fixed #15795 - `__repr__` for RegexURLPattern not unicode safe
Thanks to Mark Raddatz for the report and patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@16158 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
23b32c7554
commit
970ae01620
|
@ -131,7 +131,7 @@ class RegexURLPattern(object):
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s %s %s>' % (self.__class__.__name__, self.name, self.regex.pattern)
|
return smart_str(u'<%s %s %s>' % (self.__class__.__name__, self.name, self.regex.pattern))
|
||||||
|
|
||||||
def add_prefix(self, prefix):
|
def add_prefix(self, prefix):
|
||||||
"""
|
"""
|
||||||
|
@ -188,7 +188,7 @@ class RegexURLResolver(object):
|
||||||
self._app_dict = None
|
self._app_dict = None
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern)
|
return smart_str(u'<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern))
|
||||||
|
|
||||||
def _populate(self):
|
def _populate(self):
|
||||||
lookups = MultiValueDict()
|
lookups = MultiValueDict()
|
||||||
|
|
Loading…
Reference in New Issue