Ticket #6353: 6353-2.diff
File 6353-2.diff, 1.3 KB (added by , 17 years ago) |
---|
-
django/utils/encoding.py
49 49 if not isinstance(s, basestring,): 50 50 if hasattr(s, '__unicode__'): 51 51 s = unicode(s) 52 elif isinstance(s, Exception): 53 try: 54 s = unicode(s) 55 except UnicodeError: 56 if errors == 'replace': 57 s = ' '.join([force_unicode(arg, encoding, strings_only, errors) for arg in s.args]) 58 else: 59 raise 52 60 else: 53 61 s = unicode(str(s), encoding, errors) 54 62 elif not isinstance(s, unicode): -
django/views/debug.py
177 177 'root_urlconf': settings.ROOT_URLCONF, 178 178 'request_path': request.path[1:], # Trim leading slash 179 179 'urlpatterns': tried, 180 'reason': s tr(exception),180 'reason': smart_unicode(exception, errors='replace'), 181 181 'request': request, 182 182 'request_protocol': request.is_secure() and "https" or "http", 183 183 'settings': get_safe_settings(),