Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Luke Plant authored May 05, 2011

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  django/core/urlresolvers.py
4  django/core/urlresolvers.py
@@ -131,7 +131,7 @@ def __init__(self, regex, callback, default_args=None, name=None):
131 131
         self.name = name
132 132
 
133 133
     def __repr__(self):
134  
-        return '<%s %s %s>' % (self.__class__.__name__, self.name, self.regex.pattern)
  134
+        return smart_str(u'<%s %s %s>' % (self.__class__.__name__, self.name, self.regex.pattern))
135 135
 
136 136
     def add_prefix(self, prefix):
137 137
         """
@@ -188,7 +188,7 @@ def __init__(self, regex, urlconf_name, default_kwargs=None, app_name=None, name
188 188
         self._app_dict = None
189 189
 
190 190
     def __repr__(self):
191  
-        return '<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern)
  191
+        return smart_str(u'<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern))
192 192
 
193 193
     def _populate(self):
194 194
         lookups = MultiValueDict()

0 notes on commit 970ae01

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