tmpl-fastapi/app/paths/pages.py
2023-02-20 12:09:43 +04:00

20 lines
423 B
Python

"""Main FastAPI paths"""
from fastapi import Request, Response
from . import paths
from .. import respond
class MainPaths(paths.Paths):
"""Main FastAPI app paths,
inherits paths.Paths"""
def add_paths(self) -> None:
@self.app.get('/')
async def index(req: Request) -> Response:
return respond.with_tmpl(
'index.html',
request=req,
)