title: I want to put django's object in the templapates JavaScript, but I can't What should I do?
body: <pre><code>class KcalDetailView(DetailView):
      model = User
      context_object_name = 'target_kcal'
      template_name = 'kcalculatorapp/detail.html'
    
      def get_context_data(self, **kwargs):
          kcl = self.request.user.kcal
          context = super().get_context_data(**kwargs)
  
          i = 0
          kcal_list = []
          while i &lt; 13:
              i = i + 1;
              if kcl.goal == 'diet':
                  kcal_list.append((kcl.weight -round((500/7000)*i,2) ))
              else:
                  kcal_list.append((kcl.weight + round((500 / 7000) * i,2)))
  
          context['kcal_list'] = kcal_list
  
          return context
  </code></pre>
  <p><a href="https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/line-labels" rel="nofollow noreferrer">https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/line-labels</a></p>
  <p>this chart use.</p>
  <p><code>templates.html</code></p>
  <pre><code>    .
      .
      .
  &lt;script&gt;
      .
      .
      .
          series: [{
              name: 'a',
              data: {{  kcal_list }}     // this !!!
          }]
      });
  &lt;/script&gt;
  </code></pre>
  <p>For example
  kcal_list = [ 10, 13, 15, 16, 20 ]
  It's in the form of a list.</p>
  <p>And data: [10, 13, 15, 16, 20] Why does it look like this?</p>
  <p>data : {{kcal_list}} is not possible?</p>
  <p>What should I do?</p>