<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <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>
  </head>
  <body>
    <div class="traceback_wrapper">
      <h1>$escape(exception_type)</h1>
      <p class="errormsg">$escape(exception_value)</p>

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

      <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 %>
          $code_table(frame)
          $var_table(frame['vars'])
          <% 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="">
            </form>
          <% endif %>
        </div>
      <% endfor %>
      </div>

      <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.
        </p>
      </div>

      <% 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) %>
          <dl>
            <dt onclick="toggleTableVars($num)">$escape(key)</dt>
            <dd id="tvar-$num">$var_table(info)</dd>
          </dl>
        <% endfor %>
      <% endif %>
    </div>

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

<!-- Plain traceback:

<%py
  import re
  print re.sub('-{2,}', '-', plaintb)
%>
-->
