bugfix
This commit is contained in:
parent
71035080b6
commit
ebaafec95a
@ -9,6 +9,7 @@ from aiohttp.web_response import Response, StreamResponse
|
|||||||
from appPublic.jsonConfig import getConfig
|
from appPublic.jsonConfig import getConfig
|
||||||
from appPublic.dictObject import DictObject
|
from appPublic.dictObject import DictObject
|
||||||
from appPublic.folderUtils import listFile
|
from appPublic.folderUtils import listFile
|
||||||
|
from appPublic.argsConvert import ArgsConvert
|
||||||
from appPublic.log import info, debug, warning, error, critical, exception
|
from appPublic.log import info, debug, warning, error, critical, exception
|
||||||
|
|
||||||
from .utils import unicode_escape
|
from .utils import unicode_escape
|
||||||
@ -165,6 +166,22 @@ class TemplateProcessor(BaseProcessor):
|
|||||||
else:
|
else:
|
||||||
self.headers['Content-Type'] = 'text/html; utf-8'
|
self.headers['Content-Type'] = 'text/html; utf-8'
|
||||||
|
|
||||||
|
class BricksAppProcessor(TemplateProcessor):
|
||||||
|
@classmethod
|
||||||
|
def isMe(self,name):
|
||||||
|
return name=='app'
|
||||||
|
|
||||||
|
async def datahandle(self, request):
|
||||||
|
params = await self.resource.y_env['request2ns']()
|
||||||
|
await super().datahandle(request)
|
||||||
|
if params.get('_webbricks_',None):
|
||||||
|
return
|
||||||
|
txt = self.content
|
||||||
|
entire_url = self.run_ns.get('entire_url')
|
||||||
|
content0 = await self.resource.path_call(request,entire_url('/bricks/bricksapp.tmpl'))
|
||||||
|
ac = ArgsConvert("${", "}$"
|
||||||
|
self.content = ac.convert(content0, {'appdic':txt})
|
||||||
|
|
||||||
class BricksUIProcessor(TemplateProcessor):
|
class BricksUIProcessor(TemplateProcessor):
|
||||||
@classmethod
|
@classmethod
|
||||||
def isMe(self,name):
|
def isMe(self,name):
|
||||||
|
Loading…
Reference in New Issue
Block a user