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