如何在django-debug-toolbar中显示stacktrace [英] How to show stacktrace in django-debug-toolbar

查看:94
本文介绍了如何在django-debug-toolbar中显示stacktrace的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何强制ddt向我显示stacktrace?我只能看到执行查询的模板部分.但是没有可以生成查询的视图.我设置

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

设置,但这对我没有帮助.我的版本是0.9.4.

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

推荐答案

允许我自己引用...

Allow myself to quote... myself:

您可以通过将debug_toolbar/panels/sql.py:197更改为读取来修补0.9.4安装

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:])

(和import os.path在上方).

12fdf7e 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆