summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2011-09-16 17:07:19 +0000
committerCarl Meyer <carl@oddbird.net>2011-09-16 17:07:19 +0000
commitd1d6109229b4c103da682d4aa8bcac930c07da0b (patch)
tree9b605a516d68040554830e3dbdf7d99c99c6f754 /docs
parent343004c4de332bfec09e8a57de775a46fecb18f9 (diff)
Added release note and updated TEMPLATE_DEBUG documentation for r16833. Thanks jezdez for the reminder.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/settings.txt6
-rw-r--r--docs/releases/1.4.txt16
2 files changed, 19 insertions, 3 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index f23a187bf2..781c231354 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -1836,9 +1836,9 @@ TEMPLATE_DEBUG
Default: ``False``
A boolean that turns on/off template debug mode. If this is ``True``, the fancy
-error page will display a detailed report for any ``TemplateSyntaxError``. This
-report contains the relevant snippet of the template, with the appropriate line
-highlighted.
+error page will display a detailed report for any exception raised during
+template rendering. This report contains the relevant snippet of the template,
+with the appropriate line highlighted.
Note that Django only displays fancy error pages if :setting:`DEBUG` is ``True``, so
you'll want to set that to take advantage of this setting.
diff --git a/docs/releases/1.4.txt b/docs/releases/1.4.txt
index f12db2817b..8de9e8d358 100644
--- a/docs/releases/1.4.txt
+++ b/docs/releases/1.4.txt
@@ -263,6 +263,22 @@ setup for test suites) has seen a performance benefit as a result.
See the :meth:`~django.db.models.query.QuerySet.bulk_create` docs for more
information.
+No wrapping of exceptions in ``TEMPLATE_DEBUG`` mode
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In previous versions of Django, whenever the :setting:`TEMPLATE_DEBUG` setting
+was ``True``, any exception raised during template rendering (even exceptions
+unrelated to template syntax) were wrapped in ``TemplateSyntaxError`` and
+re-raised. This was done in order to provide detailed template source location
+information in the debug 500 page.
+
+In Django 1.4, exceptions are no longer wrapped. Instead, the original
+exception is annotated with the source information. This means that catching
+exceptions from template rendering is now consistent regardless of the value of
+:setting:`TEMPLATE_DEBUG`, and there's no need to catch and unwrap
+``TemplateSyntaxError`` in order to catch other errors.
+
+
Minor features
~~~~~~~~~~~~~~