summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorWilliam Schwartz <wkschwartz@gmail.com>2021-03-30 15:57:33 -0500
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-31 09:11:39 +0200
commita118564ae167fa80c2628b1d22292794af4c0341 (patch)
tree9f14c3614c89aa0cc913549783747d470cecd8b9 /django
parentd67d48e923eafd8ab7f8cc21985584f9606d9808 (diff)
[3.2.x] Refs #32105 -- Moved ExceptionReporter template paths to properties.
Refs #32316. Backport of 7248afe12f40361870388ecdd7e0038eb0d58e47 from main
Diffstat (limited to 'django')
-rw-r--r--django/views/debug.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index e2f9ffe3e2..a24ffa6a97 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -245,8 +245,14 @@ class SafeExceptionReporterFilter:
class ExceptionReporter:
"""Organize and coordinate reporting on exceptions."""
- html_template_path = CURRENT_DIR / 'templates' / 'technical_500.html'
- text_template_path = CURRENT_DIR / 'templates' / 'technical_500.txt'
+
+ @property
+ def html_template_path(self):
+ return CURRENT_DIR / 'templates' / 'technical_500.html'
+
+ @property
+ def text_template_path(self):
+ return CURRENT_DIR / 'templates' / 'technical_500.txt'
def __init__(self, request, exc_type, exc_value, tb, is_email=False):
self.request = request