Open andsommerarau opened 1 year ago
Yes, the current code was written before the pages
feature was merged. It's on my TODO list to update the library to support the new pages implementation. If you have ideas/preferences for how the syntax should/could look, please post them here, and I'll take them into consideration :)
Hello Dash Extensions Developers,
I've been enjoying using the DashBlueprints feature from dash-extensions, which is, as I understand, inspired by Flask's Blueprints. It's been very beneficial in structuring my Dash applications.
In your documentation, the use of DashBlueprints is demonstrated with "pages" from the dash-labs plugin (DashBlueprints documentation). Given the recent development where Dash has included an official "pages" feature using a different structure, the method described in the documentation seems to be outdated (Assuming that the 'pages' feature of dash_labs is superseded). Since Dash has introduced its own official "pages" implementation, I'm curious about the correct way to employ DashBlueprints with Dash's built-in "pages" and how to make use of
dash.register_page()
.To provide a clear picture, below is the example using the official Dash "pages" feature but without DashBlueprints:
If I want to transform the above example into a DashBlueprint, my main point of confusion arises when using
bp = DashBlueprint()
: Should I utilizebp.register(app, "page name")
and access theapp
object when I'm within the page1.py file, which ideally shouldn't contain theapp
object? As you can see from the above code snippets, Dash "pages" are registered usingdash.register_page(__name__)
, eliminating the need to use theapp
object.Any help or guidance you can provide to transform above example in DashBlueprint would be greatly appreciated. Thank you for your time and effort put into developing this helpful library.
Best regards, Andres