I have sent a variable in context from my django python code as so:
context = {
"data": data,
}
return render(request, "template.html", context)
but do not know how to access it in my javascript file. I have tried accessing it like this:
data_from_django = {{ data }}
However this simply gives me a syntax error. Please can someone tell me the correct way to access this variable.