我刚开始使用 django-piston。
通常,在 Django 中,当我的 View 抛出异常时(并且我处于 DEBUG=True 模式),我会得到一个非常好的、有用的带有堆栈跟踪的 500 错误页面。
但是当我启用了 Django-piston 的 View 抛出一个异常而不是一个漂亮的堆栈跟踪页面时,我得到一个简单的错误页面,其中只打印了异常消息。
例如……
Piston/0.2.3rc1 (Django 1.3) crash report:
Method signature does not match.
Signature should be: domain
Exception was: exceptions must be old-style classes or derived from BaseException, not NoneType
如何取回有用的 Django 堆栈跟踪页面?
谢谢。
请您参考如下方法:
所以这是对我自己的问题的一种非回答。
好像Django Piston是一个几乎死掉的项目。我切换到使用 Django Tastypie .
