added csrf handling to quickedit
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user