Kaydet (Commit) b5feff39 authored tarafından Adrian Holovaty's avatar Adrian Holovaty

Fixed #842 -- 500 error view no longer breaks for local variable named 'items'. Thanks, rjwittams

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst 09f32294
...@@ -25,7 +25,7 @@ def technical_500_response(request, exc_type, exc_value, tb): ...@@ -25,7 +25,7 @@ def technical_500_response(request, exc_type, exc_value, tb):
'filename' : filename, 'filename' : filename,
'function' : function, 'function' : function,
'lineno' : lineno, 'lineno' : lineno,
'vars' : tb.tb_frame.f_locals, 'vars' : tb.tb_frame.f_locals.items(),
'id' : id(tb), 'id' : id(tb),
'pre_context' : pre_context, 'pre_context' : pre_context,
'context_line' : context_line, 'context_line' : context_line,
...@@ -253,7 +253,7 @@ TECHNICAL_500_TEMPLATE = """ ...@@ -253,7 +253,7 @@ TECHNICAL_500_TEMPLATE = """
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for var in frame.vars.items|dictsort:"0" %} {% for var in frame.vars|dictsort:"0" %}
<tr> <tr>
<td>{{ var.0 }}</td> <td>{{ var.0 }}</td>
<td class="code"><div>{{ var.1|pprint|escape }}</div></td> <td class="code"><div>{{ var.1|pprint|escape }}</div></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment