Creating a pyramid/python application where the view callable passes in an array variable called data, structured as
[[[x1,y1,z1,],...],[[v1,v2,v3],...]]
In the view callable:
import json
jsdata = json.dumps(data)
I aim to place this data within a javascript script tag section of the template like so:
<script>
data=${jsdata}
</script>
However, I have doubts regarding the syntax. How should I proceed?
Further information: according to this source, Genshi style replacements may be the solution. Yet, I am uncertain if this approach differs when inserting into a JavaScript tag. Can anyone clarify?