Use JINJA_EXTENSIONS setting if available when creating the Environment object.

This commit is contained in:
Allan Whatmough 2010-12-27 23:27:40 +00:00
commit 3c0649d89f

View file

@ -34,7 +34,7 @@ class Generator(object):
templates ready to use with Jinja2. templates ready to use with Jinja2.
""" """
path = os.path.expanduser(os.path.join(self.theme, 'templates')) path = os.path.expanduser(os.path.join(self.theme, 'templates'))
env = Environment(loader=FileSystemLoader(path)) env = Environment(loader=FileSystemLoader(path),extensions=self.settings.get('JINJA_EXTENSIONS', []))
templates = {} templates = {}
for template in _TEMPLATES: for template in _TEMPLATES:
try: try: