mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #25373 -- Added warning logging for exceptions during {% include %} tag rendering.
This commit is contained in:
parent
85c52743f7
commit
392f64842f
4 changed files with 75 additions and 8 deletions
|
@ -596,8 +596,15 @@ Templates
|
|||
* Added a :meth:`Context.setdefault() <django.template.Context.setdefault>`
|
||||
method.
|
||||
|
||||
* A warning will now be logged for missing context variables. These messages
|
||||
will be logged to the :ref:`django.template <django-template-logger>` logger.
|
||||
* The :ref:`django.template <django-template-logger>` logger was added and
|
||||
includes the following messages:
|
||||
|
||||
* A ``DEBUG`` level message for missing context variables.
|
||||
|
||||
* A ``WARNING`` level message for uncaught exceptions raised
|
||||
during the rendering of an ``{% include %}`` when debug mode is off
|
||||
(helpful since ``{% include %}`` silences the exception and returns an
|
||||
empty string).
|
||||
|
||||
* The :ttag:`firstof` template tag supports storing the output in a variable
|
||||
using 'as'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue