Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #15795 - `__repr__` for RegexURLPattern not unicode safe

Thanks to Mark Raddatz for the report and patch

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 23b32c7 commit 970ae0162012185e441aa4a204c0f8b381975a47 @spookylukey spookylukey committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/
4 django/core/
@@ -131,7 +131,7 @@ def __init__(self, regex, callback, default_args=None, name=None): = name
def __repr__(self):
- return '<%s %s %s>' % (self.__class__.__name__,, self.regex.pattern)
+ return smart_str(u'<%s %s %s>' % (self.__class__.__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.