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

make bokeh.resources.JSResources and CSSResources crawl only models in document for external resources #5086

Open
canavandl opened this issue Sep 3, 2016 · 0 comments
Milestone

Comments

@canavandl
Copy link
Contributor

Currently when a new ViewModel is defined (in bokeh/model.py) it's added to a model_class_reverse_map. When Bokeh collects the necessary resources with the JSResources and CSSResources objects (in bokeh/resources.py), it crawls the model_class_reverse_map dict and checks each model for a __javascript__ and __css__ attribute.

The issue is that there are use cases where a user will create custom models that aren't included in the document. Those models' resources will be included in the output element regardless. Apart from slower page loads, it's possible to have conflicting resources.

The solution is likely to make sure that the model is actually in the document.

@bryevdv bryevdv added this to the short-term milestone Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants