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

Method update

dash/dash.py:2557–2584  ·  view source on GitHub ↗
(pathname_, search_, **states)

Source from the content-addressed store, hash-verified

2555 hidden=True,
2556 )
2557 async def update(pathname_, search_, **states):
2558 query_parameters = _parse_query_string(search_)
2559 page, path_variables = _path_to_page(
2560 self.strip_relative_path(pathname_)
2561 )
2562 if page == {}:
2563 for module, page in _pages.PAGE_REGISTRY.items():
2564 if module.split(".")[-1] == "not_found_404":
2565 layout = page["layout"]
2566 title = page["title"]
2567 break
2568 else:
2569 layout = html.H1("404 - Page not found")
2570 title = self.title
2571 else:
2572 layout = page.get("layout", "")
2573 title = page["title"]
2574
2575 if callable(layout):
2576 layout = await execute_async_function(
2577 layout,
2578 **{**(path_variables or {}), **query_parameters, **states},
2579 )
2580 if callable(title):
2581 title = await execute_async_function(
2582 title, **{**(path_variables or {})}
2583 )
2584 return layout, {"title": title}
2585
2586 _validate.check_for_duplicate_pathnames(_pages.PAGE_REGISTRY)
2587 _validate.validate_registry(_pages.PAGE_REGISTRY)

Callers 15

test_cdpr002_updatemodesFunction · 0.45
get_appFunction · 0.45
get_appFunction · 0.45
on_focusFunction · 0.45
get_appFunction · 0.45
get_appFunction · 0.45
get_appFunction · 0.45
get_propsFunction · 0.45
get_appFunction · 0.45
get_appFunction · 0.45
get_appFunction · 0.45

Calls 6

strip_relative_pathMethod · 0.95
_parse_query_stringFunction · 0.85
_path_to_pageFunction · 0.85
execute_async_functionFunction · 0.85
layoutFunction · 0.50
getMethod · 0.45

Tested by 15

test_cdpr002_updatemodesFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
on_focusFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36
get_appFunction · 0.36