Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/werkzeug/debug/shared/body.tmpl
blob: 71cee2090ab861ff1279a0ac2d5ebcf55104cdf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!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)
%>
-->