Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib/werkzeug/debug/templates
diff options
context:
space:
mode:
Diffstat (limited to 'lib/werkzeug/debug/templates')
-rw-r--r--lib/werkzeug/debug/templates/console.html28
-rw-r--r--lib/werkzeug/debug/templates/dump_object.html14
-rw-r--r--lib/werkzeug/debug/templates/frame.html6
-rw-r--r--lib/werkzeug/debug/templates/help_command.html10
-rw-r--r--lib/werkzeug/debug/templates/source.html8
-rw-r--r--lib/werkzeug/debug/templates/traceback_full.html55
-rw-r--r--lib/werkzeug/debug/templates/traceback_plaintext.html6
-rw-r--r--lib/werkzeug/debug/templates/traceback_summary.html23
8 files changed, 150 insertions, 0 deletions
diff --git a/lib/werkzeug/debug/templates/console.html b/lib/werkzeug/debug/templates/console.html
new file mode 100644
index 0000000..ada2730
--- /dev/null
+++ b/lib/werkzeug/debug/templates/console.html
@@ -0,0 +1,28 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>Console // Werkzeug Debugger</title>
+ <link rel="stylesheet" href="./__debugger__?cmd=resource&amp;f=style.css" type="text/css">
+ <script type="text/javascript" src="./__debugger__?cmd=resource&amp;f=jquery.js"></script>
+ <script type="text/javascript" src="./__debugger__?cmd=resource&amp;f=debugger.js"></script>
+ <script type="text/javascript">
+ var EVALEX = true,
+ CONSOLE_MODE = true;
+ </script>
+ </head>
+ <body>
+ <div class="debugger">
+ <h1>Interactive Console</h1>
+ <div class="explanation">
+ In this console you can execute Python expressions in the context of the
+ application. The initial namespace was created by the debugger automatically.
+ </div>
+ <div class="console"><div class="inner">The Console requires JavaScript.</div></div>
+ <div class="footer">
+ Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
+ friendly Werkzeug powered traceback interpreter.
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/lib/werkzeug/debug/templates/dump_object.html b/lib/werkzeug/debug/templates/dump_object.html
new file mode 100644
index 0000000..59d80bf
--- /dev/null
+++ b/lib/werkzeug/debug/templates/dump_object.html
@@ -0,0 +1,14 @@
+<div class="box">
+ <h3>$escape(title)</h3>
+ <% if repr %>
+ <div class="repr">$repr</div>
+ <% endif %>
+ <table>
+ <% for key, value in items %>
+ <tr>
+ <th>$escape(key)</th>
+ <td>$value</td>
+ </tr>
+ <% endfor %>
+ </table>
+</div>
diff --git a/lib/werkzeug/debug/templates/frame.html b/lib/werkzeug/debug/templates/frame.html
new file mode 100644
index 0000000..5378d1c
--- /dev/null
+++ b/lib/werkzeug/debug/templates/frame.html
@@ -0,0 +1,6 @@
+<div class="frame" id="frame-$frame.id">
+ <h4>File <cite class="filename">"$escape(frame.filename)"</cite>,
+ line <em class="line">$frame.lineno</em>,
+ in <code class="function">$escape(frame.function_name)</code></h4>
+ <pre>${escape(frame.current_line.strip())}</pre>
+</div>
diff --git a/lib/werkzeug/debug/templates/help_command.html b/lib/werkzeug/debug/templates/help_command.html
new file mode 100644
index 0000000..3ce949b
--- /dev/null
+++ b/lib/werkzeug/debug/templates/help_command.html
@@ -0,0 +1,10 @@
+<%py missing = object() %>
+<div class="box">
+ <% if title and text %>
+ <h3>$title</h3>
+ <pre class="help">$text</pre>
+ <% else %>
+ <h3>Help</h3>
+ <p>Type help(object) for help about object.</p>
+ <% endif %>
+</div>
diff --git a/lib/werkzeug/debug/templates/source.html b/lib/werkzeug/debug/templates/source.html
new file mode 100644
index 0000000..529dfbc
--- /dev/null
+++ b/lib/werkzeug/debug/templates/source.html
@@ -0,0 +1,8 @@
+<table class="source">
+<% for line in lines %>
+ <tr class="${' '.join(line.classes)}">
+ <td class="lineno">${line.lineno}</td>
+ <td>$escape(line.code)</td>
+ </tr>
+<% endfor %>
+</table>
diff --git a/lib/werkzeug/debug/templates/traceback_full.html b/lib/werkzeug/debug/templates/traceback_full.html
new file mode 100644
index 0000000..edfc64b
--- /dev/null
+++ b/lib/werkzeug/debug/templates/traceback_full.html
@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>$escape(traceback.exception) // Werkzeug Debugger</title>
+ <link rel="stylesheet" href="./__debugger__?cmd=resource&amp;f=style.css" type="text/css">
+ <script type="text/javascript" src="./__debugger__?cmd=resource&amp;f=jquery.js"></script>
+ <script type="text/javascript" src="./__debugger__?cmd=resource&amp;f=debugger.js"></script>
+ <script type="text/javascript">
+ var TRACEBACK = $traceback.id,
+ CONSOLE_MODE = false,
+ EVALEX = ${evalex and 'true' or 'false'};
+ </script>
+ </head>
+ <body>
+ <div class="debugger">
+ <h1>$escape(traceback.exception_type)</h1>
+ <div class="detail">
+ <p class="errormsg">$escape(traceback.exception)</p>
+ </div>
+ <h2 class="traceback">Traceback <em>(most recent call last)</em></h2>
+ $traceback.render_summary(include_title=False)
+ <div class="plain">
+ <form action="http://paste.pocoo.org/" method="post">
+ <p>
+ <input type="hidden" name="language" value="pytb">
+ This is the Copy/Paste friendly version of the traceback. <span
+ class="pastemessage">You can also paste this traceback into the public
+ lodgeit pastebin: <input type="submit" value="create paste"></span>
+ </p>
+ <textarea cols="50" rows="10" name="code" readonly>$escape(traceback.plaintext)</textarea>
+ </form>
+ </div>
+ <div class="explanation">
+ The debugger caught an exception in your WSGI application. You can now
+ look at the traceback which led to the error. <span class="nojavascript">
+ If you enable JavaScript you can also use additional features such as code
+ execution (if the evalex feature is enabled), automatic pasting of the
+ exceptions and much more.</span>
+ </div>
+ <div class="footer">
+ Brought to you by <strong class="arthur">DON'T PANIC</strong>, your
+ friendly Werkzeug powered traceback interpreter.
+ </div>
+ </div>
+ </body>
+</html>
+<!--
+
+<%py
+ import re
+ print re.sub('-{2,}', '-', traceback.plaintext)
+%>
+
+-->
diff --git a/lib/werkzeug/debug/templates/traceback_plaintext.html b/lib/werkzeug/debug/templates/traceback_plaintext.html
new file mode 100644
index 0000000..91901d2
--- /dev/null
+++ b/lib/werkzeug/debug/templates/traceback_plaintext.html
@@ -0,0 +1,6 @@
+Traceback (most recent call last):
+<% for frame in traceback.frames %>
+ File "$frame.filename", line $frame.lineno, in $frame.function_name
+ $frame.current_line.strip()
+<% endfor %>
+$traceback.exception
diff --git a/lib/werkzeug/debug/templates/traceback_summary.html b/lib/werkzeug/debug/templates/traceback_summary.html
new file mode 100644
index 0000000..5cafe0a
--- /dev/null
+++ b/lib/werkzeug/debug/templates/traceback_summary.html
@@ -0,0 +1,23 @@
+<div class="traceback">
+ <% if traceback.is_syntax_error %>
+ <% if include_title %>
+ <h3>Syntax Error</h3>
+ <% endif %>
+ <ul>
+ <% for frame in traceback.frames %>
+ <li>$frame.render()</li>
+ <% endfor %>
+ </ul>
+ <pre>$escape(traceback.exception)</pre>
+ <% else %>
+ <% if include_title %>
+ <h3>Traceback <em>(most recent call last)</em>:</h3>
+ <% endif %>
+ <ul>
+ <% for frame in traceback.frames %>
+ <li<% if frame.info %> title="$escape(frame.info, True)"<% endif %>>$frame.render()</li>
+ <% endfor %>
+ </ul>
+ <blockquote>$escape(traceback.exception)</blockquote>
+ <% endif %>
+</div>