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

[Doc] Dash - auto change in routing | note #293

Merged
merged 4 commits into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion doc/apps/dash.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ app = Dash(__name__)
server = app.server
```

```{note}
- `server = app.server` - Required to start a production grade server. Without it, deployment will fail as the infrastructure cannot find the server to start.
- `app = Dash(__name__)` - The deployment may require modification of the application's basic routing. If deployment fails, check the following log:

_ERROR: We were not able to modify your Routing automatically_

_INSTRUCTION: Please add `url_base_pathname="/application/"` to `app = Dash(__name__, ...)`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this happen because of the marketing banner?

Copy link
Member Author

@LatentDream LatentDream Nov 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, for this comment: https://github.com/ploomber/cloud-backend/pull/1626#discussion_r1861149148

Bryan recommended to add a notice

  • But the replace should always work, since the search is done in every python files of the project. (I handle all the cases, with multiple parameters, if the url_base_pathname is already there, the ordering, and more..)
  • So we could not mention it in the Doc. And if ever if fails (it should not, it's thoroughly tested), a is log emitted.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(So this PR is optional)


This modification is automated, but you may see the notice above if it fails.
```


## Testing locally

To test the Dash application, you can run the following commands locally:
Expand Down Expand Up @@ -150,4 +162,4 @@ By default applications run with Python 3.11. Refer to this [section](../faq/faq
[Live demo](https://delicate-cake-9107.ploomberapp.io)
:::

::::
::::