MCPcopy Index your code
hub / github.com/plotly/dash / _setup_catchall

Method _setup_catchall

dash/backends/_fastapi.py:333–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

331 process the request and then return the appropriate response (e.g., 404 if no Dash route matches)."""
332
333 def _setup_catchall(self):
334 try:
335 dash_app = get_app()
336
337 async def catchall(_request: Request):
338 return Response(content=dash_app.index(), media_type="text/html")
339
340 # pylint: disable=protected-access
341 self.add_url_rule("{path:path}", catchall, methods=["GET"])
342 except Exception: # pylint: disable=broad-exception-caught
343 traceback.print_exc()
344
345 def add_url_rule(
346 self,

Callers 1

__call__Method · 0.80

Calls 2

add_url_ruleMethod · 0.95
get_appFunction · 0.90

Tested by

no test coverage detected