]> git.ipfire.org Git - thirdparty/jinja.git/commit
imported templates can see the current globals 1241/head
authorAmy <leiamy12@gmail.com>
Mon, 22 Jun 2020 13:54:08 +0000 (09:54 -0400)
committerDavid Lord <davidism@gmail.com>
Mon, 22 Jun 2020 16:56:10 +0000 (09:56 -0700)
commitcc792d8c918b44c3c6815cced07b0a334a2fed42
tree350a8732bfa8c222e39c82640197b8f788df7a91
parentcd88dec8ea7c5aa13fdf120481cc989be2c7916f
imported templates can see the current globals

_get_default_module takes an optional context to indicate that the
template is imported. If there are differences between the environment
and rendered template globals, a new module is used for the imported
template.
CHANGES.rst
src/jinja2/asyncsupport.py
src/jinja2/compiler.py
src/jinja2/environment.py
src/jinja2/runtime.py
tests/test_imports.py