Skip to content

Commit

Permalink
update docs for get_asset_url
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamConnors committed Nov 11, 2024
1 parent 4d580da commit d2e2e54
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -1559,18 +1559,16 @@ def get_asset_url(self, path):
`path` is the path passed to `get_asset_url`.
Use `get_asset_url` in an app to access assets at the correct location
in different environments. `requests_pathname_prefix` in a deployed app
on Dash Enterprise includes the app name.
For an app on Dash Enterprise called "my-app",
in different environments. In a deployed app on Dash Enterprise,
`requests_pathname_prefix` is the app name. For an app called "my-app",
`app.get_asset_url("image.png")` would return:
```
/my-app/assets/image.png
```
While the same app running locally,
without `requests_pathname_prefix` set would return:
While the same app running locally, without
`requests_pathname_prefix` set, would return:
```
/assets/image.png
Expand Down

0 comments on commit d2e2e54

Please sign in to comment.