1
from charmhelpers.fetch import (
3
filter_installed_packages
7
TEMPLATES_DIR = 'templates'
12
apt_install(filter_installed_packages(['python-jinja2']),
17
def render_template(template_name, context, template_dir=TEMPLATES_DIR):
18
templates = jinja2.Environment(
19
loader=jinja2.FileSystemLoader(template_dir))
20
template = templates.get_template(template_name)
21
return template.render(context)