templating - prepare integration into ui

This commit is contained in:
bunkerity
2021-05-28 16:41:41 +02:00
parent c7b81cfc10
commit 99c259bf18
10 changed files with 114 additions and 57 deletions

View File

@@ -24,7 +24,7 @@ class Configurator :
if self.__check_var(var, value) :
self.__variables[var] = value
else :
print("Problem with " + var + "=" + value)
print("Ignoring " + var + "=" + value)
def get_config(self) :
config = {}

View File

@@ -9,7 +9,7 @@ class Templator :
self.__target_path = target_path
if not self.__target_path.endswith("/") :
self.__target_path += "/"
self.__template_env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath=self.__input_path))
self.__template_env = jinja2.Environment(loader=jinja2.FileSystemLoader(searchpath=self.__input_path), trim_blocks=True, lstrip_blocks=True)
def render_global(self) :
return self.__render("global")