mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #18773 -- Added logging for template variable resolving
Added a django.template logger without a default handler. Added logging if there is an exception while resolving variables in a template.
This commit is contained in:
parent
0c91a419f8
commit
dc5b01ad05
6 changed files with 93 additions and 0 deletions
|
@ -188,6 +188,9 @@ 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.
|
||||
|
||||
Requests and Responses
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -478,6 +478,16 @@ Messages to this logger have the following extra context:
|
|||
* ``request``: The request object that generated the logging
|
||||
message.
|
||||
|
||||
.. _django-template-logger:
|
||||
|
||||
``django.template``
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.9
|
||||
|
||||
Log messages related to the rendering of templates. Missing context variables
|
||||
are logged as ``DEBUG`` messages if :setting:`DEBUG` is `True`.
|
||||
|
||||
.. _django-db-logger:
|
||||
|
||||
``django.db.backends``
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue