Ticket #4786: views_debug_py.diff

File views_debug_py.diff, 1.2 KB (added by Thomas Güttler <hv@…>, 8 years ago)
  • views/debug.py

     
    103103        module_name = tb.tb_frame.f_globals.get('__name__')
    104104        pre_context_lineno, pre_context, context_line, post_context = _get_lines_from_file(filename, lineno, 7, loader, module_name)
    105105        if pre_context_lineno is not None:
     106            mycode=not re.search(r'(site-packages.django|lib.?.?.python)', filename) # Display my files bigger
    106107            frames.append({
    107108                'tb': tb,
    108109                'filename': filename,
     110                'mycode': mycode,
    109111                'function': function,
    110112                'lineno': lineno + 1,
    111113                'vars': tb.tb_frame.f_locals.items(),
     
    401403    <ul class="traceback">
    402404      {% for frame in frames %}
    403405        <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>
    405408
    406409          {% if frame.context_line %}
    407410            <div class="context" id="c{{ frame.id }}">
Back to Top