当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python Django ExceptionReporter.get_traceback_data用法及代码示例


本文介绍django.views.debug.ExceptionReporter.get_traceback_data的用法。

声明

get_traceback_data()

返回包含回溯信息的字典。

这是自定义异常报告的主要扩展点,例如:

from django.views.debug import ExceptionReporter


class CustomExceptionReporter(ExceptionReporter):
    def get_traceback_data(self):
        data = super().get_traceback_data()
        # ... remove/add something here ...
        return data

相关用法


注:本文由纯净天空筛选整理自djangoproject.com大神的英文原创作品 django.views.debug.ExceptionReporter.get_traceback_data。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。