diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2013-08-07 16:01:00 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2013-08-07 16:01:00 +0100 |
commit | 701e9ada2b6968cf2bc41a3c1d4235922ce164f5 (patch) | |
tree | 7759f0063e5bebf05698114e1a8fc815c74d6afa | |
parent | c6519c1f5c52015e3f7d7eeaab6f109bbca80e4e (diff) | |
download | jinja2-701e9ada2b6968cf2bc41a3c1d4235922ce164f5.tar.gz |
Fixed prefix loader now properly forward globals.
This fixes #238
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | jinja2/loaders.py | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -5,6 +5,9 @@ Version 2.7.2 ------------- (bugfix release, release date to be decided) +- Prefix loader was not forwarding the locals properly to + inner loaders. This is now fixed. + Version 2.7.1 ------------- (bugfix release, released on August 7th 2013) diff --git a/jinja2/loaders.py b/jinja2/loaders.py index a9a2625..cc9c683 100644 --- a/jinja2/loaders.py +++ b/jinja2/loaders.py @@ -349,7 +349,7 @@ class PrefixLoader(BaseLoader): def load(self, environment, name, globals=None): loader, local_name = self.get_loader(name) try: - return loader.load(environment, local_name) + return loader.load(environment, local_name, globals) except TemplateNotFound: # re-raise the exception with the correct fileame here. # (the one that includes the prefix) |