Refs #30102 -- Added comment on use of Template without placeholders in page_not_found() view.
This commit is contained in:
parent
181fb60159
commit
876dc306cd
|
@ -52,6 +52,8 @@ def page_not_found(request, exception, template_name=ERROR_404_TEMPLATE_NAME):
|
||||||
if template_name != ERROR_404_TEMPLATE_NAME:
|
if template_name != ERROR_404_TEMPLATE_NAME:
|
||||||
# Reraise if it's a missing custom template.
|
# Reraise if it's a missing custom template.
|
||||||
raise
|
raise
|
||||||
|
# Render template (even though there are no substitutions) to allow
|
||||||
|
# inspecting the context in tests.
|
||||||
template = Engine().from_string(
|
template = Engine().from_string(
|
||||||
'<h1>Not Found</h1>'
|
'<h1>Not Found</h1>'
|
||||||
'<p>The requested resource was not found on this server.</p>')
|
'<p>The requested resource was not found on this server.</p>')
|
||||||
|
|
Loading…
Reference in New Issue