bugfix
This commit is contained in:
parent
ff5311df85
commit
934d717e78
@ -68,7 +68,7 @@ class BaseProcessor(AppLogger):
|
|||||||
return
|
return
|
||||||
self.real_path = self.resource.url2file(request.path)
|
self.real_path = self.resource.url2file(request.path)
|
||||||
g = ServerEnv()
|
g = ServerEnv()
|
||||||
self.run_ns = {}
|
self.run_ns = DictObject()
|
||||||
self.run_ns.update(g)
|
self.run_ns.update(g)
|
||||||
self.run_ns.update(self.resource.y_env)
|
self.run_ns.update(self.resource.y_env)
|
||||||
self.run_ns['request'] = request
|
self.run_ns['request'] = request
|
||||||
|
@ -33,6 +33,7 @@ from aiohttp.web_response import Response, StreamResponse
|
|||||||
from aiohttp.web_routedef import AbstractRouteDef
|
from aiohttp.web_routedef import AbstractRouteDef
|
||||||
|
|
||||||
from appPublic.jsonConfig import getConfig
|
from appPublic.jsonConfig import getConfig
|
||||||
|
from appPublic.dictObject import DictObject
|
||||||
from appPublic.i18n import getI18N
|
from appPublic.i18n import getI18N
|
||||||
from appPublic.dictObject import DictObject, multiDict2Dict
|
from appPublic.dictObject import DictObject, multiDict2Dict
|
||||||
from appPublic.timecost import TimeCost
|
from appPublic.timecost import TimeCost
|
||||||
@ -43,6 +44,7 @@ from .baseProcessor import getProcessor, BricksUIProcessor, TemplateProcessor
|
|||||||
from .baseProcessor import PythonScriptProcessor, MarkdownProcessor
|
from .baseProcessor import PythonScriptProcessor, MarkdownProcessor
|
||||||
|
|
||||||
from .xlsxdsProcessor import XLSXDataSourceProcessor
|
from .xlsxdsProcessor import XLSXDataSourceProcessor
|
||||||
|
from .llmProcessor import LlmProcessor
|
||||||
from .websocketProcessor import WebsocketProcessor, XtermProcessor
|
from .websocketProcessor import WebsocketProcessor, XtermProcessor
|
||||||
from .sqldsProcessor import SQLDataSourceProcessor
|
from .sqldsProcessor import SQLDataSourceProcessor
|
||||||
from .functionProcessor import FunctionProcessor
|
from .functionProcessor import FunctionProcessor
|
||||||
@ -113,7 +115,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
fname = self.url2file(path)
|
fname = self.url2file(path)
|
||||||
return fname
|
return fname
|
||||||
|
|
||||||
async def getPostData(self,request: Request) -> dict:
|
async def getPostData(self,request: Request) -> DictObject:
|
||||||
qd = {}
|
qd = {}
|
||||||
if request.query:
|
if request.query:
|
||||||
qd = multiDict2Dict(request.query)
|
qd = multiDict2Dict(request.query)
|
||||||
@ -135,8 +137,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
# print('body is not a json')
|
# print('body is not a json')
|
||||||
pass
|
pass
|
||||||
qd.update(pd)
|
qd.update(pd)
|
||||||
# print(f'{qd=} reader is None, {pd=}')
|
return DictObject(**qd)
|
||||||
return qd
|
|
||||||
ns = qd
|
ns = qd
|
||||||
while 1:
|
while 1:
|
||||||
try:
|
try:
|
||||||
@ -165,9 +166,7 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
print_exc()
|
print_exc()
|
||||||
print('-----------except out ------------')
|
print('-----------except out ------------')
|
||||||
break;
|
break;
|
||||||
# showcallstack()
|
return DictObject(ns)
|
||||||
# print(f'getPostData():{ns=}')
|
|
||||||
return ns
|
|
||||||
|
|
||||||
def parse_request(self, request):
|
def parse_request(self, request):
|
||||||
"""
|
"""
|
||||||
@ -234,12 +233,11 @@ class ProcessorResource(AppLogger, StaticResource,Url2File):
|
|||||||
return g.myi18n(s,l)
|
return g.myi18n(s,l)
|
||||||
|
|
||||||
|
|
||||||
async def getArgs():
|
async def getArgs() -> DictObject:
|
||||||
ns = DictObject()
|
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
return await self.getPostData(request)
|
return await self.getPostData(request)
|
||||||
ns = multiDict2Dict(request.query)
|
ns = multiDict2Dict(request.query)
|
||||||
return ns
|
return DictObject(**ns)
|
||||||
|
|
||||||
async def redirect(url):
|
async def redirect(url):
|
||||||
url = self.entireUrl(request, url)
|
url = self.entireUrl(request, url)
|
||||||
|
Loading…
Reference in New Issue
Block a user