Basic loading of a template.
# -*- coding: UTF-8 -*- # This will create a template environment with the # default settings and a loader that looks up the # templates in the templates folder inside the # yourapplication python package. import jinja2 env = jinja2.Environment( loader=jinja2.PackageLoader('yourapplication', 'templates')) # Load template from an environment. template = env.get_template('mytemplate.html') # Render a template. print template.render(the='variables', go='here')