mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
configd/templates, add decode_idna and encode_idna to template parser, see https://github.com/opnsense/core/pull/2327
This commit is contained in:
parent
075a0b7a4a
commit
cf3ebcae01
@ -60,6 +60,10 @@ class Template(object):
|
||||
self._j2_env = jinja2.Environment(loader=jinja2.FileSystemLoader(self._template_dir), trim_blocks=True,
|
||||
extensions=["jinja2.ext.do", "jinja2.ext.loopcontrols"])
|
||||
|
||||
# register additional filters
|
||||
self._j2_env.filters['decode_idna'] = lambda x:x.decode('idna')
|
||||
self._j2_env.filters['encode_idna'] = lambda x:x.encode('idna')
|
||||
|
||||
def list_module(self, module_name):
|
||||
""" list single module content
|
||||
:param module_name: module name in dot notation ( company.module )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user