title: How to run a python script inside javascript and refresh the view in django
body: <p>I have a python script that takes in some data and manipulates it. However i need it to run on the client side inside the javascript to process some data and refresh the view. </p>
  
  <p>The python file that manipulates data works well as I have tested it inside the IDLE shell </p>
  
  <pre><code> DataManipulation.py
  
  class ModifyData(object):
  
         #Bunch of functions to manipulate data
  </code></pre>
  
  <p>below is the function used to render the view with url '.../test' which also works perfectly. </p>
  
  <pre><code> views.py
  
    def test(request):
  
          template = 'app/test.html'
  
          file = 'documents/Sample.csv' #File  to be loaded 
  
          args = {'test': file }
  
          return render(request, template, args)
  </code></pre>
  
  <p>After loading this page, i use a javascript library that displays the data on the page in a table, the user can then manipulate the data like multiply a column by 3, but where I am stuck is how to take my DataManipulation.py file to modify the data and updates the page with the updated column on a button click</p>