I have a function in Django views.py which passes a context variable called "queues" into an HTML page. In the HTML page, I have a button where if I click it, it should pass the context variable "queues" into a JavaScript function func. However, as shown in the image attached, I see some errors with the way I am doing this. What is the correct syntax to do this? HTML code
In your template :
<script>
let queues = {{queues_declared_in_context_view}};
...
use your javascript variable queues
</script>
In addition, here is an interesting article about safety when passing data from context to templates