def process_exception(self, request, exception):
if settings.DEBUG:
# Default exception handling, which is already nice when in DEBUG mode.
return
return HttpResponseServerError(
render_to_string(
'500.html', {
'exception': exception,
'exception_class': exception.__class__.__name__,
'error_trace': traceback.format_tb(exception.__traceback__, limit=100)
}
)
)
exception_traceback.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录