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

Prefix assets with requests_pathname_prefix. #351

Merged
merged 2 commits into from Aug 27, 2018
Merged

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented Aug 24, 2018

Fix #349, the assets were not prefixed with the requests_pathname_prefix resulting in 404 on the dash deployment server.

  • Add get_asset_url method to dash, retrieve the url of an asset by it's filename (eg: app.get_asset_url('style.css') will return /assets/style.css), it is automatically prefixed with requests_pathname_prefix.

@chriddyp
Copy link
Member

Can we add a test? Otherwise 💃

@T4rk1n
Copy link
Contributor Author

T4rk1n commented Aug 24, 2018

@chriddyp

I added a test and found out that it was not working as expected in some cases, thanks.

@ned2
Copy link
Contributor

ned2 commented Aug 27, 2018

Looks good to me 💃

@T4rk1n T4rk1n merged commit 7219b3d into master Aug 27, 2018
@T4rk1n T4rk1n deleted the assets-requests-prefix branch August 27, 2018 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assets are not prefixed with requests_pathname_prefix.
3 participants