Ticket #4786: views_debug_py.diff
File views_debug_py.diff, 1.2 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(r'(site-packages.django|lib.?.?.python)', filename) # Display my files bigger 106 107 frames.append({ 107 108 'tb': tb, 108 109 'filename': filename, 110 'mycode': mycode, 109 111 'function': function, 110 112 'lineno': lineno + 1, 111 113 'vars': tb.tb_frame.f_locals.items(), … … 401 403 <ul class="traceback"> 402 404 {% for frame in frames %} 403 405 <li class="frame"> 404 <code>{{ frame.filename|escape }}</code> in <code>{{ frame.function|escape }}</code> 406 <code style="font-weight: {% if frame.mycode %}bold{% else %}normal{% endif %}">{{ frame.filename|escape }}</code> in 407 <code>{{ frame.function|escape }}</code> 405 408 406 409 {% if frame.context_line %} 407 410 <div class="context" id="c{{ frame.id }}">