mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #32105 -- Added template paths as ExceptionReporter class attributes.
This allows replacement of the debugging templates without having to copy-paste the `get_traceback_html` and `get_traceback_text` functions into a subclass. Thanks to Nick Pope for review.
This commit is contained in:
parent
411cc0ae18
commit
68e33b347d
7 changed files with 50 additions and 3 deletions
|
@ -325,6 +325,22 @@ Your custom reporter class needs to inherit from
|
|||
|
||||
.. class:: ExceptionReporter
|
||||
|
||||
.. attribute:: html_template_path
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
A :class:`pathlib.Path` representing the absolute filesystem path to a
|
||||
template for rendering the HTML representation of the exception.
|
||||
Defaults to the Django provided template.
|
||||
|
||||
.. attribute:: text_template_path
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
A :class:`pathlib.Path` representing the absolute filesystem path to a
|
||||
template for rendering the plain-text representation of the exception.
|
||||
Defaults to the Django provided template.
|
||||
|
||||
.. method:: get_traceback_data()
|
||||
|
||||
Return a dictionary containing traceback information.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue