~cjwatson/charms/precise/squid-forwardproxy/umask

« back to all changes in this revision

Viewing changes to hooks/utils.py

  • Committer: Kit Randel
  • Date: 2015-08-14 01:03:06 UTC
  • mfrom: (27.2.8 squid-forwardproxy)
  • Revision ID: kit.randel@canonical.com-20150814010306-mx549twm655pm39w
Add configuration support for auth_param.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
 
55
55
def render_template(template_name, context, template_dir=TEMPLATES_DIR):
56
 
    templates = jinja2.Environment(
57
 
                    loader=jinja2.FileSystemLoader(template_dir)
58
 
                    )
59
 
    template = templates.get_template(template_name)
 
56
    j2env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
 
57
    template = j2env.get_template(template_name)
60
58
    return template.render(context)
61
59
 
62
60