diff --git a/django/views/debug.py b/django/views/debug.py index bde60ee58e..e5baf91662 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -349,11 +349,11 @@ TECHNICAL_500_TEMPLATE = """ {% if frame.context_line %}
{% if frame.pre_context %} -
    {% for line in frame.pre_context %}
  1. {{ line|escape }}
  2. {% endfor %}
+
    {% for line in frame.pre_context %}
  1. {{ line|escape }}
  2. {% endfor %}
{% endif %} -
  1. {{ frame.context_line|escape }} ...
+
  1. {{ frame.context_line|escape }} ...
{% if frame.post_context %} -
    {% for line in frame.post_context %}
  1. {{ line|escape }}
  2. {% endfor %}
+
    {% for line in frame.post_context %}
  1. {{ line|escape }}
  2. {% endfor %}
{% endif %}
{% endif %}