Loading django/views/debug.py +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ class ExceptionReporter(object): # (http://www.python.org/dev/peps/pep-0263/) match = re.search(br'coding[:=]\s*([-\w.]+)', line) if match: encoding = match.group(1) encoding = match.group(1).decode('ascii') break source = [six.text_type(sline, encoding, 'replace') for sline in source] Loading tests/regressiontests/views/tests/debug.py +3 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import absolute_import, unicode_literals import inspect Loading Loading
django/views/debug.py +1 −1 Original line number Diff line number Diff line Loading @@ -360,7 +360,7 @@ class ExceptionReporter(object): # (http://www.python.org/dev/peps/pep-0263/) match = re.search(br'coding[:=]\s*([-\w.]+)', line) if match: encoding = match.group(1) encoding = match.group(1).decode('ascii') break source = [six.text_type(sline, encoding, 'replace') for sline in source] Loading
tests/regressiontests/views/tests/debug.py +3 −0 Original line number Diff line number Diff line # -*- coding: utf-8 -*- # This coding header is significant for tests, as the debug view is parsing # files to search for such a header to decode the source file content from __future__ import absolute_import, unicode_literals import inspect Loading