Skip to content

Commit

Permalink
Fixed prefix loader now properly forward globals.
Browse files Browse the repository at this point in the history
This fixes pallets#238
  • Loading branch information
mitsuhiko committed Aug 7, 2013
1 parent c6519c1 commit 701e9ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion jinja2/loaders.py
Expand Up @@ -349,7 +349,7 @@ def get_source(self, environment, template):
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)
Expand Down

0 comments on commit 701e9ad

Please sign in to comment.