title: How to use Django's models in JavaScript
body: <p>I have an app in Django with 2 news in the data base. I'm using views.py in order to display these news in my html page.</p>
  
  <p><strong>Models.py</strong></p>
  
  <pre><code>class News(models.Model):
      news_title     = models.CharField(max_length=150)
      news_body       = models.TextField(max_length=1500)
  </code></pre>
  
  <p><strong>Views.py</strong></p>
  
  <pre><code>def news(request):
      news_f = News.objects.all().order_by('-news_id') 
      news_f_html = serializers.serialize("json",News.objects.all())
      news_dic=  {'news_f':news_f,'ac_tab_n':'ac_tab', 'news_f_html':news_f_html}
      return render(request, 'news.html',news_dic)
  </code></pre>
  
  <p>I want to display the news' body using html tag but I can't because it's a string. I've been reading and I tried to serialize the news in order to use news_f_html in JavaScript. </p>
  
  <p><strong>scripts.js</strong></p>
  
  <pre><code>var news = "{{ news_f_html }}"; 
  </code></pre>
  
  <p>But this doesn't work. I can't display, for example: </p>
  
  <pre><code>console.log(news[1].news_title) //Note that I have 2 news in my db app
  </code></pre>