Update.
This commit is contained in:
parent
5b28044d9e
commit
c56bf4fb49
@ -137,7 +137,12 @@ class Application(BaseApplication):
|
|||||||
|
|
||||||
def setup_router(self):
|
def setup_router(self):
|
||||||
self.router.add_get("/", IndexView)
|
self.router.add_get("/", IndexView)
|
||||||
self.router.add_get("/static/{file_path:.*}", self.static_handler)
|
self.router.add_static(
|
||||||
|
"/",
|
||||||
|
pathlib.Path(__file__).parent.joinpath("static"),
|
||||||
|
name="static",
|
||||||
|
show_index=True,
|
||||||
|
)
|
||||||
self.router.add_view("/profiler.html", profiler_handler)
|
self.router.add_view("/profiler.html", profiler_handler)
|
||||||
self.router.add_view("/about.html", AboutHTMLView)
|
self.router.add_view("/about.html", AboutHTMLView)
|
||||||
self.router.add_view("/about.md", AboutMDView)
|
self.router.add_view("/about.md", AboutMDView)
|
||||||
@ -178,6 +183,8 @@ class Application(BaseApplication):
|
|||||||
DocsApplication(path=pathlib.Path(__file__).parent.joinpath("docs")),
|
DocsApplication(path=pathlib.Path(__file__).parent.joinpath("docs")),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#self.router.add_get("/{file_path:.*}", self.static_handler)
|
||||||
|
|
||||||
async def handle_test(self, request):
|
async def handle_test(self, request):
|
||||||
|
|
||||||
return await self.render_template(
|
return await self.render_template(
|
||||||
@ -259,7 +266,6 @@ class Application(BaseApplication):
|
|||||||
|
|
||||||
paths = []
|
paths = []
|
||||||
|
|
||||||
|
|
||||||
uid = request.session.get("uid")
|
uid = request.session.get("uid")
|
||||||
if uid:
|
if uid:
|
||||||
user_static_path = await self.services.user.get_static_path(uid)
|
user_static_path = await self.services.user.get_static_path(uid)
|
||||||
|
Loading…
Reference in New Issue
Block a user