title: run python script using ajax
body: <p>I have the python script which export data from a database. The script executes the exportData function()</p>
  
  <p>I would like to run that on the website by clicking a button via ajax.</p>
  
  <p>This is want i have come up with but it does not seem to run the python script.</p>
  
  <pre><code>$(document).ready(function() {
  
  $("#open").click(function(){
   $.ajax({
        url:"export.py", success: function(){alert("DONE");}
   });
    });
  });
  
  &lt;button type="button" class="open" id="open" onclick="#" &gt;Button&lt;/button&gt;
  </code></pre>
  
  <p>Any help would be very much appreciated.</p>