How to show stacktrace in django-debug-toolbar

只谈情不闲聊 提交于 2019-12-08 00:08:29

问题


How can I force ddt to show me stacktrace? I can only see parts of templates in which queries are executed. But there are no views which generates queries. I set

'ENABLE_STACKTRACES' : True

in settings but this does not help me. I have version 0.9.4.


回答1:


Allow myself to quote... myself:

You can patch your 0.9.4 install by changing debug_toolbar/panels/sql.py:197 to read

params = map(escape, os.path.split(frame[0]) + frame[1:])

(and import os.path somewhere above).

It looks like this issue was fixed in 12fdf7e (render_stacktrace).



来源:https://stackoverflow.com/questions/9352158/how-to-show-stacktrace-in-django-debug-toolbar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!