MCPcopy
hub / github.com/encode/starlette / homepage

Function homepage

tests/test_templates.py:24–25  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

22 file.write("<html>Hello, <a href='{{ url_for('homepage') }}'>world</a></html>")
23
24 async def homepage(request: Request) -> Response:
25 return templates.TemplateResponse(request, "index.html")
26
27 app = Starlette(debug=True, routes=[Route("/", endpoint=homepage)])
28 templates = Jinja2Templates(directory=str(tmpdir))

Callers

nothing calls this directly

Calls 1

TemplateResponseMethod · 0.80

Tested by

no test coverage detected