From 32545f4ea4fe6a8352712154fab3a43a58df4df1 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 25 Jan 2021 12:07:56 +0800 Subject: [PATCH] bugfix --- appPublic/myTE.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appPublic/myTE.py b/appPublic/myTE.py index a880212..b49ad21 100644 --- a/appPublic/myTE.py +++ b/appPublic/myTE.py @@ -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) + self.env = Environment(loader=loader, enable_async=True) 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 = template.render(**data) + uRet = await template.render_async(**data) return uRet def renders(self,tmplstring,data):