summaryrefslogtreecommitdiff
path: root/docs/howto/error-reporting.txt
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2020-10-15 11:44:02 +0200
committerCarlton Gibson <carlton@noumenal.es>2020-10-15 13:56:15 +0200
commit68e33b347d5684214783ac65c5b4f0598f35c0f6 (patch)
tree69e1c590ef271abbdfb322409bf779b20b1bcbe8 /docs/howto/error-reporting.txt
parent411cc0ae18aa9c64447eed229e65e092d23f80e6 (diff)
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.
Diffstat (limited to 'docs/howto/error-reporting.txt')
-rw-r--r--docs/howto/error-reporting.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/howto/error-reporting.txt b/docs/howto/error-reporting.txt
index c77f1e955e..e2dbe7ca27 100644
--- a/docs/howto/error-reporting.txt
+++ b/docs/howto/error-reporting.txt
@@ -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.