Author: carljm
Date: 2011-09-16 10:07:19 -0700 (Fri, 16 Sep 2011)
New Revision: 16841

Modified:
   django/trunk/docs/ref/settings.txt
   django/trunk/docs/releases/1.4.txt
Log:
Added release note and updated TEMPLATE_DEBUG documentation for r16833. Thanks 
jezdez for the reminder.

Modified: django/trunk/docs/ref/settings.txt
===================================================================
--- django/trunk/docs/ref/settings.txt  2011-09-16 16:41:38 UTC (rev 16840)
+++ django/trunk/docs/ref/settings.txt  2011-09-16 17:07:19 UTC (rev 16841)
@@ -1836,9 +1836,9 @@
 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.

Modified: django/trunk/docs/releases/1.4.txt
===================================================================
--- django/trunk/docs/releases/1.4.txt  2011-09-16 16:41:38 UTC (rev 16840)
+++ django/trunk/docs/releases/1.4.txt  2011-09-16 17:07:19 UTC (rev 16841)
@@ -263,6 +263,22 @@
 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
 ~~~~~~~~~~~~~~
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to