Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a universal url_4 that works across dash and flask #75

Open
aaron-schroeder opened this issue Jan 12, 2023 · 0 comments
Open

Create a universal url_4 that works across dash and flask #75

aaron-schroeder opened this issue Jan 12, 2023 · 0 comments
Labels
enhancement New feature or request Ideas Refactor

Comments

@aaron-schroeder
Copy link
Owner

aaron-schroeder commented Jan 12, 2023

The dash page registry is kind of a black box to me. Where it's accessible, how it stores its routing information, etc. But I think it holds the key to writing a function that can serve as a combination of url_for and

For dash page routing, I have stuck to mostly hardcoding route urls, with a small amount of hacky uses of the dash page registry.

Example entry in dash.page_registry ordered dict:

(pages.training_stress, {'module': 'pages.training_stress', 'supplied_path': None, 'path_template': '/stress', 'path': '/stress', 'supplied_name': 'Training Stress Dashboard', 'name': 'Training Stress Dashboard', 'supplied_title': 'Training Stress Dashboard', 'title': 'Training Stress Dashboard', 'description': '', 'order': None, 'supplied_order': None, 'supplied_layout': None, 'supplied_image': None, 'image': None, 'image_url': None, 'redirect_from': None, 'relative_path': '/stress', 'layout': <function layout at 0x7faaf6c1b700>}

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Ideas Refactor
Projects
None yet
Development

No branches or pull requests

1 participant