Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.3k
fix blueprint registering and double init#3798
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than add these blueprint checks for each backend, what if you add a check in If you go with the current per backend approach, certain calls would add duplicate handlers or attempt to register the same routes again: self.backend.before_request(self._setup_server)
...
self._setup_routes() |
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I asked Claude to write a test that would look at the idempotency when calling init twice. This might be worth adding: deftest_init_app_idempotent_on_same_server():
external=Flask("ext")
app=Dash(__name__, server=False)
app.init_app(external)
app.init_app(external) # must not raise# request still worksclient=external.test_client()
assertclient.get("/").status_code==200 |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could revert this change and get rid of this file from the PR.