diff --git a/django/views/debug.py b/django/views/debug.py index aa0a93b863..6d1b0d0e6c 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -100,13 +100,13 @@ def technical_500_response(request, exc_type, exc_value, tb): 'tb': tb, 'filename': filename, 'function': function, - 'lineno': lineno, + 'lineno': lineno + 1, 'vars': tb.tb_frame.f_locals.items(), 'id': id(tb), 'pre_context': pre_context, 'context_line': context_line, 'post_context': post_context, - 'pre_context_lineno': pre_context_lineno, + 'pre_context_lineno': pre_context_lineno + 1, }) tb = tb.tb_next @@ -360,11 +360,11 @@ TECHNICAL_500_TEMPLATE = """ {% if frame.context_line %}