Merge "Add extra methods in template when using template override"

This commit is contained in:
Jenkins 2016-09-13 14:31:00 +00:00 committed by Gerrit Code Review
commit 8d5080407e

View File

@ -673,6 +673,7 @@ class KollaWorker(object):
env = jinja2.Environment( # nosec: not used to render HTML env = jinja2.Environment( # nosec: not used to render HTML
loader=jinja2.FileSystemLoader(template_path)) loader=jinja2.FileSystemLoader(template_path))
env.filters.update(self._get_filters()) env.filters.update(self._get_filters())
env.globals.update(self._get_methods())
template = env.get_template(template_name) template = env.get_template(template_name)
if self.include_header: if self.include_header:
with open(self.include_header, 'r') as f: with open(self.include_header, 'r') as f: