Closed Conengmo closed 1 month ago
@hansthen want to do a final review of this one?
As a future enhancement, I think the to_javascript filter may benefit from pretty indentation, but that should not block this change.
Good idea!
And thanks for the review!
Based on https://github.com/python-visualization/folium/pull/1856, split off from the more complete version in https://github.com/python-visualization/folium/pull/1895.
Add a custom Template class that contains the
tojavascript
template filter that converts Python objects to Javascript notation. This may include Javascript object references or functions.Instead of applying this template everywhere at once, we'll adopt is gradually where it is useful. This is mainly when one of the arguments is a Javascript function or when we want to reference another Folium object in the Javascript template.