Index: cms/converters.py |
=================================================================== |
--- a/cms/converters.py |
+++ b/cms/converters.py |
@@ -279,17 +279,21 @@ class TemplateConverter(Converter): |
exec code in module.__dict__ |
func = os.path.basename(root) |
if not hasattr(module, func): |
raise Exception("Expected function %s not found in filter file %s" % (func, filename)) |
filters[func] = getattr(module, func) |
filters[func].module_ref = module # Prevent garbage collection |
- self._env = jinja2.Environment(loader=self._SourceLoader(self._params["source"]), autoescape=True) |
+ self._env = jinja2.Environment( |
+ loader=self._SourceLoader(self._params["source"]), |
+ extensions=["jinja2.ext.do",], |
+ autoescape=True |
+ ) |
self._env.filters.update(filters) |
self._env.globals.update(globals) |
def get_html(self, source): |
template = self._env.from_string(source) |
return template.render(self._params) |
def translate(self, default, name, comment=None): |