Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit 970ae0162012185e441aa4a204c0f8b381975a47 1 parent 23b32c7
@spookylukey spookylukey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/urlresolvers.py
View
4 django/core/urlresolvers.py
@@ -131,7 +131,7 @@ def __init__(self, regex, callback, default_args=None, name=None):
self.name = name
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):
"""
@@ -188,7 +188,7 @@ def __init__(self, regex, urlconf_name, default_kwargs=None, app_name=None, name
self._app_dict = None
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):
lookups = MultiValueDict()

0 comments on commit 970ae01

Please sign in to comment.
Something went wrong with that request. Please try again.