Commit dcc72a2a by ichuang

added csrf handling to quickedit

parent 22572bf8
......@@ -387,6 +387,7 @@ def quickedit(request, id=None):
'pxmls' : pxmls,
'phtml' : phtml,
'init_js':instance.get_init_js(),
'csrf':csrf(request)['csrf_token'],
}
result = render_to_response('quickedit.html', context)
......
......@@ -53,6 +53,7 @@ function postJSON(url, data, callback) {
<br/>
<input type="submit" value="Change Problem" name="qesubmit" />
<input type="submit" value="Revert to original" name="qesubmit" />
<input type="hidden" name="csrfmiddlewaretoken" value="${csrf}"/>
</form>
<span>${msg|n}</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment