title: Is there a known way to pass variables from django views to a js scipt on a template? I am building a chart, and need to display information
body: <p>So, I would want to pass a variable into NEED_VARIABLE_PASSED. This code is in one of my html templates. I understand I can't use {{variable}}, so is there a way?</p>
  <pre><code>
          &lt;script type=&quot;text/javascript&quot;&gt;
                 function drawChart() {
                 var data = google.visualization.arrayToDataTable([
                      [&quot;Element&quot;, &quot;Density&quot;, { role: &quot;style&quot; }],
                      [&quot;WLWS&quot;, NEED_VARIABLE_PASSED, &quot;#696969&quot;],
                      [&quot;Upperbin&quot;, NEED_VARIABLE_PASSED, &quot;#696969&quot;],
                      [&quot;Solenoid&quot;, NEED_VARIABLE_PASSED, &quot;#696969&quot;],
                      [&quot;BrakeSW&quot;, NEED_VARIABLE_PASSED, &quot;color: #696969&quot;]
                 ]);
          &lt;/script&gt;
  </code></pre>