1👍
✅
You can work with the |add
template filter [Django-doc]:
var gltf_home = "{% static '/3d/'|add:scene.GltfFileToLoad %}";
But I would advise not to do this: perform the logic in the view, and work with the |json_script
template filter [Django-doc], this will properly encode the data in a JSON blob, and thus prevents escaping, etc.
Source:stackexchange.com