Ticket #19098: regex-url-resolver_repr_unicode.diff

File regex-url-resolver_repr_unicode.diff, 743 bytes (added by artamoshin, 12 years ago)
  • urlresolvers.py

    old new  
    88"""
    99
    1010import re
     11import sys
    1112from threading import local
    1213
    1314from django.http import Http404
     
    232233        self._app_dict = {}
    233234
    234235    def __repr__(self):
    235         return smart_str(u'<%s %s (%s:%s) %s>' % (self.__class__.__name__, self.urlconf_name, self.app_name, self.namespace, self.regex.pattern))
     236        return smart_str(u'<%s %s (%s:%s) %s>' % (self.__class__.__name__,
     237                    str(self.urlconf_name).decode(sys.getfilesystemencoding()),
     238                    self.app_name, self.namespace, self.regex.pattern))
    236239
    237240    def _populate(self):
    238241        lookups = MultiValueDict()
Back to Top