Ticket #15795: urlresolvers-r16022.diff

File urlresolvers-r16022.diff, 898 bytes (added by Mark Raddatz <mraddatz@…>, 14 years ago)

Patch that adds smart_str to the repr() function.

  • urlresolvers.py

     
    131131        self.name = name
    132132
    133133    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))
    135135
    136136    def add_prefix(self, prefix):
    137137        """
     
    188188        self._app_dict = None
    189189
    190190    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))
    192192
    193193    def _populate(self):
    194194        lookups = MultiValueDict()
Back to Top