bugfix
This commit is contained in:
parent
c0426d5710
commit
4a81516742
@ -150,20 +150,23 @@ class TemplateProcessor(BaseProcessor):
|
||||
else:
|
||||
self.headers['Content-Type'] = 'text/html; utf-8'
|
||||
|
||||
class JSUIProcessor(TemplateProcessor):
|
||||
class BricksUIProcessor(TemplateProcessor):
|
||||
@classmethod
|
||||
def isMe(self,name):
|
||||
return name=='jsui'
|
||||
return name=='bui'
|
||||
|
||||
async def datahandle(self, request):
|
||||
params = await self.resource.y_env['request2ns']()
|
||||
if params.get('_jsui',None):
|
||||
super().datahandle(request)
|
||||
await super().datahandle(request)
|
||||
print(f'{self.content=}')
|
||||
if params.get('_webbricks_',None):
|
||||
return
|
||||
else:
|
||||
content0 = await self.resource.path_call(request,'/header.tmpl')
|
||||
content1 = await self.resource.path_call(request,self.path)
|
||||
content2 = await self.resource.path_call(request,'/footer.tmpl')
|
||||
self.content = '%s%s%s' % (content0,content1,content2)
|
||||
txt = self.content
|
||||
entire_url = self.run_ns.get('entire_url')
|
||||
content0 = await self.resource.path_call(request,entire_url('/header.tmpl'))
|
||||
content2 = await self.resource.path_call(request,entire_url('/footer.tmpl'))
|
||||
self.content = '%s%s%s' % (content0, txt, content2)
|
||||
|
||||
class PythonScriptProcessor(BaseProcessor):
|
||||
@classmethod
|
||||
|
@ -39,7 +39,9 @@ from appPublic.timecost import TimeCost
|
||||
from appPublic.timeUtils import timestampstr
|
||||
from appPublic.app_logger import AppLogger
|
||||
|
||||
from .baseProcessor import getProcessor
|
||||
from .baseProcessor import getProcessor, BricksUIProcessor, TemplateProcessor
|
||||
from .baseProcessor import PythonScriptProcessor, MarkdownProcessor
|
||||
|
||||
from .xlsxdsProcessor import XLSXDataSourceProcessor
|
||||
from .websocketProcessor import WebsocketProcessor, XtermProcessor
|
||||
from .sqldsProcessor import SQLDataSourceProcessor
|
||||
|
Loading…
Reference in New Issue
Block a user