Complete newbie question:
I have a Django app running in which I generate a view with data:
result = json.dumps(data)
context = RequestContext(request, {
'result': result,
})
return HttpResponse(template.render(context))
Now I have a map.js file in which I render a heat map of the data using d3.js.
I also have an index.html file where my page is rendered and the heatmap reference is passed via
<body>
<div id="heatMap">
</div>
<body>
Question: how do I pass my data generated in the view to the map.js file?
Thanks so much for your help!