From 21bf685f5e660a187fcac31e84d5cd89758aeb74 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sat, 7 Nov 2015 17:24:07 +0100 Subject: Fixed #25697 -- Made default error views error when passed a nonexistent template_name. --- docs/ref/views.txt | 16 ++++++++++++++++ docs/releases/1.10.txt | 3 +++ 2 files changed, 19 insertions(+) (limited to 'docs') diff --git a/docs/ref/views.txt b/docs/ref/views.txt index 133a79814b..8069264039 100644 --- a/docs/ref/views.txt +++ b/docs/ref/views.txt @@ -93,6 +93,10 @@ Three things to note about 404 views: second parameter, the exception that triggered the error. A useful representation of the exception is also passed in the template context. +.. versionchanged:: 1.10 + + Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``. + .. _http_internal_server_error_view: The 500 (server error) view @@ -113,6 +117,10 @@ If :setting:`DEBUG` is set to ``True`` (in your settings module), then your 500 view will never be used, and the traceback will be displayed instead, with some debug information. +.. versionchanged:: 1.10 + + Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``. + .. _http_forbidden_view: The 403 (HTTP Forbidden) view @@ -148,6 +156,10 @@ view you can use code like this:: unicode representation of the exception is also passed in the template context. +.. versionchanged:: 1.10 + + Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``. + .. _http_bad_request_view: The 400 (bad request) view @@ -173,3 +185,7 @@ filesystem paths. The signature of ``bad_request()`` changed in Django 1.9. The function now accepts a second parameter, the exception that triggered the error. + +.. versionchanged:: 1.10 + + Passing a nonexistent ``template_name`` will raise ``TemplateDoesNotExist``. diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt index 33ca4bd12c..ff6900243f 100644 --- a/docs/releases/1.10.txt +++ b/docs/releases/1.10.txt @@ -464,6 +464,9 @@ Miscellaneous now better to call the ``LogEntry.get_change_message()`` method which will provide the message in the current language. +* The default error views now raise ``TemplateDoesNotExist`` if a nonexistent + ``template_name`` is specified. + .. _deprecated-features-1.10: Features deprecated in 1.10 -- cgit v1.3