Django

Code

Changeset 1381

Show
Ignore:
Timestamp:
11/23/05 17:15:52 (3 years ago)
Author:
adrian
Message:

Added Wilson's HTML tweaks to the template error screen

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/debug.py

    r1380 r1381  
    274274{% if template_info %} 
    275275<div id="template"> 
    276    <h2>Template</h2> 
    277    In template {{ template_info.name }}, error at line {{ template_info.line }} 
    278    <div>{{ template_info.message|escape }}</div
     276   <h2>Template error</h2> 
     277   <p>In template <code>{{ template_info.name }}</code>, error at line <strong>{{ template_info.line }}</strong></p> 
     278   <h3>{{ template_info.message|escape }}</h3
    279279   <table class="source{% if template_info.top %} cut-top{% endif %}{% ifnotequal template_info.bottom template_info.total %} cut-bottom{% endifnotequal %}"> 
    280280   {% for source_line in template_info.source_lines %} 
    281281   {% ifequal source_line.0 template_info.line %} 
    282        <tr class="error"><td>{{ source_line.0 }}</td
     282       <tr class="error"><th>{{ source_line.0 }}</th
    283283       <td>{{ template_info.before }}<span class="specific">{{ template_info.during }}</span>{{ template_info.after }}</td></tr> 
    284284   {% else %} 
    285       <tr><td>{{ source_line.0 }}</td
     285      <tr><th>{{ source_line.0 }}</th
    286286      <td> {{ source_line.1 }}</td></tr> 
    287287   {% endifequal %}