title: "uncaught Syntax error: unexpected token {" when exporting JSON content to bootstrap table script
body: <p>I am trying to convert data under django pandas dataframe to json and then to table using pandas_bootstrap_table. 
  The error in browser console is "uncaught Syntax error: unexpected token {"</p>
  
  <p>Here is my view function</p>
  
  <pre><code>    def productview(request):
          qs = npmargin.objects.filter(user=selected_user)
          df = convert_to_dataframe(qs, fields=['gross_profit_margin_2015',])
          json = df.to_json(orient='records')
          context = {
                  "data": "json"
              }
          return render (request, 'operating/chart2.html', context)
  </code></pre>
  
  <p>Below is charts2.html</p>
  
  <pre><code>    {% load static %}
      &lt;script src="{%static "js/bootstrap.min.js"%}"&gt;&lt;/script&gt;
      &lt;script src="{%static "js/jquery-slim.min.js"%}"&gt;&lt;/script&gt;
      &lt;script src="{%static "js/bootstrap-table.js"%}"&gt;&lt;/script&gt;
      &lt;script src="{%static "js/pandas_bootstrap_table.js"%}"&gt;&lt;/script&gt;
      &lt;table id='datatable'&gt;&lt;/table&gt;
  </code></pre>
  
  <p>The Json data from the  above view function is sent to pandas_boostrap_table.js. The browser shows the unexpected token "{" error at the data:{{data|safe}}</p>
  
  <pre><code>    $(document).ready(function(){
      $('#datatable').bootstrapTable({
      striped: true,
      pagination: true,
     showColumns: true,
     showToggle: true,
    showExport: true,
     sortable: true,
     paginationVAlign: 'both',
     pageSize: 25,
     pageList: [10, 25, 50, 100, 'ALL'],
     data:{{data|safe}}, //"The browser console shows error here"
  });
  </code></pre>
  
  <p>});</p>