Skip to content

Commit

Permalink
Added Wilson's HTML tweaks to the template error screen
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Nov 23, 2005
1 parent 21f2d84 commit 39eac9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions django/views/debug.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -273,16 +273,16 @@ def _get_lines_from_file(filename, lineno, context_lines):
</div> </div>
{% if template_info %} {% if template_info %}
<div id="template"> <div id="template">
<h2>Template</h2> <h2>Template error</h2>
In template {{ template_info.name }}, error at line {{ template_info.line }} <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p>
<div>{{ template_info.message|escape }}</div> <h3>{{ template_info.message|escape }}</h3>
<table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}">
{% for source_line in template_info.source_lines %} {% for source_line in template_info.source_lines %}
{% ifequal source_line.0 template_info.line %} {% ifequal source_line.0 template_info.line %}
<tr class="error"><td>{{ source_line.0 }}</td> <tr class="error"><th>{{ source_line.0 }}</th>
<td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td></tr> <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td></tr>
{% else %} {% else %}
<tr><td>{{ source_line.0 }}</td> <tr><th>{{ source_line.0 }}</th>
<td> {{ source_line.1 }}</td></tr> <td> {{ source_line.1 }}</td></tr>
{% endifequal %} {% endifequal %}
{% endfor %} {% endfor %}
Expand Down

0 comments on commit 39eac9b

Please sign in to comment.