From cd4b2ff78256d463bc6ed310818385bebc231f81 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 31 Jan 2021 14:06:37 +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 b49ad21..2f0c086 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, 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):