From b5feff39632e744bd63db7064b0056717a57288e Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 20 Nov 2005 05:17:15 +0000 Subject: [PATCH] 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 --- django/views/debug.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/views/debug.py b/django/views/debug.py index 0ddaa44a7fa..4aece9443d8 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -25,7 +25,7 @@ def technical_500_response(request, exc_type, exc_value, tb): 'filename' : filename, 'function' : function, 'lineno' : lineno, - 'vars' : tb.tb_frame.f_locals, + 'vars' : tb.tb_frame.f_locals.items(), 'id' : id(tb), 'pre_context' : pre_context, 'context_line' : context_line, @@ -253,7 +253,7 @@ TECHNICAL_500_TEMPLATE = """ - {% for var in frame.vars.items|dictsort:"0" %} + {% for var in frame.vars|dictsort:"0" %} {{ var.0 }}
{{ var.1|pprint|escape }}