add params_kw env var
This commit is contained in:
parent
e6b30650c7
commit
809f5160aa
@ -96,6 +96,9 @@ class TemplateProcessor(BaseProcessor):
|
||||
|
||||
async def datahandle(self,request):
|
||||
path = request.path
|
||||
request2ns = self.run_ns.get('request2ns')
|
||||
if request2ns:
|
||||
self.run_ns['params_kw'] = await request2ns()
|
||||
ns = self.run_ns
|
||||
te = self.run_ns['tmpl_engine']
|
||||
self.content = te.render(path,**ns)
|
||||
|
@ -45,6 +45,7 @@ def i18nDICT(request):
|
||||
i18n = getI18N()
|
||||
lang = getHeaderLang(request)
|
||||
l = c.langMapping.get(lang,lang)
|
||||
print('i18nDict():lang=',lang,',l=',l,',dict=',,i18n.getLangDict(l))
|
||||
return json.dumps(i18n.getLangDict(l)).encode(c.website.coding)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user