title: getting POST <my_url> 500 (OK), when using $.ajax POST to send json to django view
body: <p>Edite: refined the code according to advice in comments but still no luck</p>
  
  <p>Update: thanks ThiefMaster after following your advice I found a bug in my view function but after fixing it now I get in django debug</p>
  
  <blockquote>
    <p>Forbidden (403)</p>
    
    <p>CSRF verification failed. Request aborted. Help Reason given for
    failure:
        CSRF token missing or incorrect.</p>
    
    <hr>
  </blockquote>
  
  <p>I trying to use jquery ajax to send json data to django</p>
  
  <p>here is my js code</p>
  
  <pre><code>$("#send").click(function () {
      var events = $('#calendar').fullCalendar('clientEvents');
      console.log(events);
      var filter = [];
      filter[0] = 'start';
      filter[1] = 'end';
      filter[2] = 'title';
      events = JSON.stringify(events, filter, '\t');
      console.log(events);
      $.ajax({
          type: "POST",
          data: {events: events},
          url: &lt;my_url&gt;,
      });
  });
  </code></pre>
  
  <p>on chrome devtool every thing is ok until the last $.ajax()</p>
  
  <p>it throw this error
  Failed to load resource: the server responded with a status of 403 (OK)</p>
  
  <p>If any one can figure out what I'm doing wrong please go ahead </p>
  
  <p>thanks in advance</p>