A /debug/run_python endpoint for staff to test the sandboxing of Python code.

This commit is contained in:
Ned Batchelder
2013-02-22 13:31:31 -05:00
parent df17c0c7dd
commit ec7a04fdb3
6 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
<html><body>
<div>
<p>Python:</p>
<form method='post'>
<input type="hidden" name="csrfmiddlewaretoken" value="${ csrf_token }">
<div>
<textarea name='code' rows='20' cols='80'>${code|h}</textarea>
</div>
<input type='submit' value='Run it!'/>
</form>
</div>
%if results:
<div>
<p>Results:</p>
<pre>
${results|h}
</pre>
</div>
%endif