Skip to content

Commit a2eabfc

Browse files
authored
Improve integration with Django Debug Toolbar (#9213)
1 parent 4c7c693 commit a2eabfc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rest_framework/static/rest_framework/js/ajax-form.js

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ function replaceDocument(docString) {
33

44
doc.write(docString);
55
doc.close();
6+
7+
if (window.djdt) {
8+
// If Django Debug Toolbar is available, reinitialize it so that
9+
// it can show updated panels from new `docString`.
10+
window.addEventListener("load", djdt.init);
11+
}
612
}
713

814
function doAjaxSubmit(e) {

0 commit comments

Comments
 (0)