(config)
| 506 | |
| 507 | |
| 508 | def validate_use_pages(config): |
| 509 | if not config.get("assets_folder", None): |
| 510 | raise exceptions.PageError( |
| 511 | "`dash.register_page()` must be called after app instantiation" |
| 512 | ) |
| 513 | |
| 514 | try: |
| 515 | if get_app().backend.has_request_context(): |
| 516 | raise exceptions.PageError( |
| 517 | """ |
| 518 | dash.register_page() can’t be called within a callback as it updates dash.page_registry, which is a global variable. |
| 519 | For more details, see https://dash.plotly.com/sharing-data-between-callbacks#why-global-variables-will-break-your-app |
| 520 | """ |
| 521 | ) |
| 522 | except exceptions.AppNotFoundError: |
| 523 | # If the app is not found we can add pages since before instantiation. |
| 524 | pass |
| 525 | |
| 526 | |
| 527 | def validate_module_name(module): |
nothing calls this directly
no test coverage detected
searching dependent graphs…