Django-поршень заставляет поршень возвращать полную трассировку исключения

Как заставить поршень возвращать полную трассировку исключения. По умолчанию он возвращает мне только последний текст ошибки. Нравится

id() takes exactly one argument (0 given)

Нужно знать, какой файл и какая строка...


person Pol    schedule 07.01.2013    source источник


Ответы (1)


Piston загружает ответ о статусе http через utils.rc, никаких ошибок не возникает.

из документации:

Configuration variables
Piston is configurable in a couple of ways, which allows more granular 
control of some areas without editing the code.

Setting                         Meaning
settings.PISTON_EMAIL_ERRORS    If (when) Piston crashes, it will email the 
                                administrators a backtrace (like the Django one
                                you see during DEBUG = True)
settings.PISTON_DISPLAY_ERRORS  Upon crashing, will display a small backtrace 
                                to the client, including the method signature 
                                expected.
settings.PISTON_STREAM_OUTPUT   When enabled, Piston will instruct Django to 
                                stream the output to the client, but please read
                                streaming before enabling it.

Я рекомендую настроить регистратор, sentry вместе с raven довольно удобен, и вы можете настроить свой собственный уровень журнала и обработчик.

person Hedde van der Heide    schedule 07.01.2013