tmpl-fastapi/app/paths/pages.py

21 lines
417 B
Python
Raw Permalink Normal View History

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