move data web under bumper #91
5 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ class ConfServer:
|
||||||
self.app = web.Application(loop=asyncio.get_event_loop(), middlewares=[
|
self.app = web.Application(loop=asyncio.get_event_loop(), middlewares=[
|
||||||
self.log_all_requests,
|
self.log_all_requests,
|
||||||
])
|
])
|
||||||
aiohttp_jinja2.setup(self.app, loader=jinja2.FileSystemLoader(os.path.join(bumper.data_dir, "web","templates")))
|
aiohttp_jinja2.setup(self.app, loader=jinja2.FileSystemLoader(os.path.join(bumper.bumper_dir,"bumper","web","templates")))
|
||||||
|
|
||||||
self.app.add_routes(
|
self.app.add_routes(
|
||||||
[
|
[
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class portal_api_pim(plugins.ConfServerApp):
|
||||||
try:
|
try:
|
||||||
fileID = request.match_info.get("id", "")
|
fileID = request.match_info.get("id", "")
|
||||||
|
|
||||||
return web.FileResponse(os.path.join(bumper.data_dir,"web","robotvac_image.jpg"))
|
return web.FileResponse(os.path.join(bumper.bumper_dir,"bumper","web","images","robotvac_image.jpg"))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception("{}".format(e))
|
logging.exception("{}".format(e))
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class upload_global(plugins.ConfServerApp):
|
||||||
try:
|
try:
|
||||||
fileID = request.match_info.get("id", "")
|
fileID = request.match_info.get("id", "")
|
||||||
|
|
||||||
return web.FileResponse(os.path.join(bumper.data_dir,"web","robotvac_image.jpg"))
|
return web.FileResponse(os.path.join(bumper.bumper_dir,"bumper","web","images","robotvac_image.jpg"))
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception("{}".format(e))
|
logging.exception("{}".format(e))
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 143 KiB |
Loading…
Add table
Add a link
Reference in a new issue