bugfix
This commit is contained in:
parent
bfdfd37e82
commit
32545f4ea4
@ -17,7 +17,7 @@ class MyTemplateEngine:
|
|||||||
self.file_coding = file_coding
|
self.file_coding = file_coding
|
||||||
self.out_coding = out_coding
|
self.out_coding = out_coding
|
||||||
loader = FileSystemLoader(pathList, encoding=self.file_coding)
|
loader = FileSystemLoader(pathList, encoding=self.file_coding)
|
||||||
self.env = Environment(loader=loader)
|
self.env = Environment(loader=loader, enable_async=True)
|
||||||
denv={
|
denv={
|
||||||
'json':json,
|
'json':json,
|
||||||
'hasattr':hasattr,
|
'hasattr':hasattr,
|
||||||
@ -43,7 +43,7 @@ class MyTemplateEngine:
|
|||||||
|
|
||||||
def _render(self,template,data):
|
def _render(self,template,data):
|
||||||
# print('**********template=',template,'**data=',data,'type_data=',type(data),'************')
|
# print('**********template=',template,'**data=',data,'type_data=',type(data),'************')
|
||||||
uRet = template.render(**data)
|
uRet = await template.render_async(**data)
|
||||||
return uRet
|
return uRet
|
||||||
|
|
||||||
def renders(self,tmplstring,data):
|
def renders(self,tmplstring,data):
|
||||||
|
Loading…
Reference in New Issue
Block a user