title: Django Ajax form submission pointing to a 403 Forbidden
body: <p>I'm allowing users to remove posts through ajax. Posts have a boolean field live_until_removed. When set to false, the post disappears. </p>
  
  <p>When clicking remove I'm given a 403, referencing: </p>
  
  <p><code>xhr.send( ( s.hasContent &amp;&amp; s.data ) || null );</code></p>
  
  <p>How do I get this to run smoothly? Why this this error happening?</p>
  
  <p>js:</p>
  
  <pre><code>$('#removeForm').submit(function() { // catch the form's submit event
      $.ajax({
          data: $(this).serialize(),
          type: $(this).attr('method'), 
          url: $(this).attr('action'),
          success: function(response) {
              $('.close-post').html(response); // update the DIV
              console.log(response);
          },
          error: function(response){
              console.log(response);
          }
      });
      return false;
  });
  </code></pre>
  
  <p>template:</p>
  
  <pre><code>&lt;div class="close-post"&gt;
       {% if not post.live_until_removed %}
       &lt;form class="" id="removeForm" method="POST" action=""&gt;
            &lt;button type="submit" class="btn"&gt;Remove&lt;/button&gt;
       &lt;/form&gt;
       {% else %}
       &lt;button class="btn"&gt;Removed&lt;/button&gt;
       {% endif %}
  &lt;/div&gt;
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def post(request, id):
      ...
       if request.is_ajax():
            try: 
                 post = Post.objects.get(id=id)
                 post.live_until_removed = False
                 post.save()
                 response = simplejson.dumps({"status": "Removed"})
            except:
                 pass
  </code></pre>