flaskapp / werkzeug / debug / shared / body.tmpl

Full commit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    <title>$escape(exception_type) in $escape(last_frame['basename']) (Werkzeug Debugger)</title>
    <link rel="stylesheet" href="__traceback__?resource=style.css&amp;mimetype=text/css" type="text/css">
    <script type="text/javascript" src="__traceback__?resource=jquery.js&amp;mimetype=text/javascript"></script>
    <script type="text/javascript" src="__traceback__?resource=debugger.js&amp;mimetype=text/javascript"></script>
    <div class="traceback_wrapper">
      <p class="errormsg">$escape(exception_value)</p>

      <p class="errorline">
        $escape(last_frame['filename']) in
        line $last_frame['lineno']

      <h2 onclick="changeTB()" class="tb">Traceback <span>(toggle raw view)</span></h2>
      <div id="interactive">
        <p class="text">A problem occurred in your Python WSGI application.
          Here is the sequence of function calls leading up to the error, in the order
          they occurred. Activate a code line to toggle context lines.</p>

      <% for num, frame in enumerate(frames) %>
        <div class="frame" id="frame-$num">
          <h3 class="fn"><em>$escape(frame['function'])</em> in <tt>$escape(frame['filename'])</tt></h3>
          <a class="locals" href="javascript:toggleFrameVars($num)">[inspect]</a>
          <% if evalex %><a class="eval" href="javascript:toggleInterpreter($num)">[console]</a><% endif %>
          <% if evalex %>
            <form class="exec_code" action="">
              <pre class="output">[console ready]</pre>
              <input type="hidden" name="tb" value="$tb_uid">
              <input type="hidden" name="frame" value="$frame['frame_uid']">
              <input type="text" name="cmd" class="input" value="">
          <% endif %>
      <% endfor %>

      <div id="plain">
        <p class="text">Here is the plain Python traceback for copy and paste:</p>
        <pre class="plain">$escape(plaintb)</pre>
        <p class="text pastebininfo">
          <a href="javascript:pasteIt()">Create a new Paste</a> with
          this traceback in the lodgeit pastebin.

      <% if req_vars %>
        <h2>Request Data</h2>
        <p class="text">The following list contains all important request variables.
          Select a header to expand the list.</p>
        <% for num, (key, info) in enumerate(req_vars) %>
            <dt onclick="toggleTableVars($num)">$escape(key)</dt>
            <dd id="tvar-$num">$var_table(info)</dd>
        <% endfor %>
      <% endif %>

    <div id="footer">
      Brought to you by <span class="arthur">DON'T PANIC</span>, your friendly
      Werkzeug powered traceback interpreter.

<!-- Plain traceback:

  import re
  print re.sub('-{2,}', '-', plaintb)