Ticket #4786: views_debug_py.2.diff
File views_debug_py.2.diff, 1.4 KB (added by , 17 years ago) |
---|
-
views/debug.py
103 103 module_name = tb.tb_frame.f_globals.get('__name__') 104 104 pre_context_lineno, pre_context, context_line, post_context = _get_lines_from_file(filename, lineno, 7, loader, module_name) 105 105 if pre_context_lineno is not None: 106 mycode=not re.search( 107 r'site-packages/|lib.?.?/python|' 108 r'django/(contrib|core|db|dispatch|(new|old)?forms|http|middleware|shortcuts|template(tags)?|test|utils|views)/', 109 filename) # Display my files bigger and python/django files smaller. 106 110 frames.append({ 107 111 'tb': tb, 108 112 'filename': filename, 113 'mycode': mycode, 109 114 'function': function, 110 115 'lineno': lineno + 1, 111 116 'vars': tb.tb_frame.f_locals.items(), … … 401 406 <ul class="traceback"> 402 407 {% for frame in frames %} 403 408 <li class="frame"> 404 <code>{{ frame.filename|escape }}</code> in <code>{{ frame.function|escape }}</code> 409 <code style="font-size: {% if frame.mycode %}x-large{% else %}medium{% endif %}">{{ frame.filename|escape }}</code> in 410 <code>{{ frame.function|escape }}</code> 405 411 406 412 {% if frame.context_line %} 407 413 <div class="context" id="c{{ frame.id }}">