A /debug/run_python endpoint for staff to test the sandboxing of Python code.
This commit is contained in:
19
lms/templates/debug/run_python_form.html
Normal file
19
lms/templates/debug/run_python_form.html
Normal 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
|
||||
Reference in New Issue
Block a user