Merge pull request #437 from sparkprime/jinja_imports

Expandybird: Fix Jinja file imports
pull/442/head
Dave Cunningham 9 years ago
commit ca854af579

@ -282,7 +282,9 @@ def ExpandJinja(file_name, source_template, resource, imports):
"""
try:
env = jinja2.Environment(loader=jinja2.DictLoader(imports))
jinja_imports = (
{i['path']: i['content'] for _, i in imports.iteritems()})
env = jinja2.Environment(loader=jinja2.DictLoader(jinja_imports))
template = env.from_string(source_template)

Loading…
Cancel
Save