如何在AJAX调用上使用django-debug-toolbar? [英] How to use django-debug-toolbar on AJAX calls?
问题描述
例如,我使用一个jQuery $ .get与一堆参数来打Django URL,并将其加载。如果我有错误,它没有在工具栏上注册。我也不能通过复制AJAX URL来使用它,因为DDT附加到响应的body标签,使用AJAX响应来包含body标签是没有意义的。
任何方向都会有帮助!谢谢!
我以前也有同样的问题!
随着我越来越多的AJAX重应用程序,我发布了一个 Django应用程序和一个 Chrome扩展程序,一起解决了这个问题。
所有信息都在github资料库中。
I'm curious if there's a reasonable way to use the (amazing) django-debug-toolbar with AJAX queries.
For example, I use a jQuery $.get with a bunch of parameters to hit a Django URL and load it inline. If I have an error with that, it isn't registered on the toolbar. I also can't use it by copying the AJAX URL because DDT attaches to the body tag of the response, and it wouldn't make any sense to be including body tags with AJAX responses.
Any direction would be helpful! Thanks!
I had the same problem before! And as I'm doing more and more AJAX heavy applications, I released a Django Application and a Chrome extension that together solved exactly that problem.
All the information is in the github repository.
这篇关于如何在AJAX调用上使用django-debug-toolbar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!