mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #25848 -- Set template origin on each node.
Prior to 55f12f8709
, the template origin was available on each node via
`self.token.source[0]`. This behavior was removed when debug handling was
simplified, but 3rd-party debugging tools still depend on its presence.
This updates the Parser to set origin on individual nodes. This enables the
source template to be determined even when template extending or including is
used.
This commit is contained in:
parent
477274acb4
commit
cfda1fa3f8
3 changed files with 22 additions and 2 deletions
|
@ -75,3 +75,10 @@ Bugfixes
|
|||
* Fixed a crash when calling the ``migrate`` command in a test case with the
|
||||
``available_apps`` attribute pointing to an application with migrations
|
||||
disabled using the ``MIGRATION_MODULES`` setting (:ticket:`26135`).
|
||||
|
||||
* Restored the ability for testing and debugging tools to determine the
|
||||
template from which a node came from, even during template inheritance or
|
||||
inclusion. Prior to Django 1.9, debugging tools could access the template
|
||||
origin from the node via ``Node.token.source[0]``. This was an undocumented,
|
||||
private API. The origin is now available directly on each node using the
|
||||
``Node.origin`` attribute (:ticket:`25848`).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue