This commit is contained in:
yumoqing 2021-01-31 14:06:37 +08:00
parent 2e79e7670d
commit cd4b2ff782

View File

@ -17,7 +17,7 @@ class MyTemplateEngine:
self.file_coding = file_coding
self.out_coding = out_coding
loader = FileSystemLoader(pathList, encoding=self.file_coding)
self.env = Environment(loader=loader, enable_async=True)
self.env = Environment(loader=loader, enable_async=False)
denv={
'json':json,
'hasattr':hasattr,
@ -43,7 +43,7 @@ class MyTemplateEngine:
def _render(self,template,data):
# print('**********template=',template,'**data=',data,'type_data=',type(data),'************')
uRet = await template.render_async(**data)
uRet = template.render_async(**data)
return uRet
def renders(self,tmplstring,data):