Ticket #4300: views_debug_py.diff
File views_debug_py.diff, 670 bytes (added by , 18 years ago) |
---|
-
django/views/debug.py
122 122 'function': '?', 123 123 'lineno': '?', 124 124 }] 125 126 # Exception values might contain unkown encodings. 127 # Example: Postgres might return latin1 strings. 128 try: 129 exc_value=str(exc_value).decode("latin1") 130 except UnicodeError: 131 exc_value=str(exc_value).decode("utf8", "replace") 132 125 133 t = Template(TECHNICAL_500_TEMPLATE, name='Technical 500 template') 126 134 c = Context({ 127 135 'exception_type': exc_type.__name__,