title: How to POST a django form with AJAX & jQuery
body: <p>I've checked out tons of tutorials for django AJAX forms, but each one of them tells you one way of doing it, none of them is simple and I'm a bit confused since I've never worked with AJAX.</p>
  
  <p>I have a model called "note", a modelform for it, and inside the template I need that everytime a note element sends the stop() signal (from jQuery Sortables) django updates the object.</p>
  
  <p>My current code:</p>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>def save_note(request, space_name):
  
      """
      Saves the note content and position within the table.
      """
      place = get_object_or_404(Space, url=space_name)
      note_form = NoteForm(request.POST or None)
  
      if request.method == "POST" and request.is_ajax:
          msg = "The operation has been received correctly."          
          print request.POST
  
      else:
          msg = "GET petitions are not allowed for this view."
  
      return HttpResponse(msg)
  </code></pre>
  
  <p><strong>JavaScript:</strong></p>
  
  <pre><code>function saveNote(noteObj) {
      /*
          saveNote(noteObj) - Saves the notes making an AJAX call to django. This
          function is meant to be used with a Sortable 'stop' event.
          Arguments: noteObj, note object.
      */
      var noteID = noteObj.attr('id');
  
      $.post("../save_note/", {
          noteid: noteID,
          phase: "Example phase",
          parent: $('#' + noteID).parent('td').attr('id'),
          title: $('#' + noteID + ' textarea').val(),
          message: "Blablbla",
      });
  }
  </code></pre>
  
  <p>The current code gets the data from the template and prints it in the terminal. I don't know how I can manipulate this data. I've seen some people manages the data through jqueryforms to send the data to django.</p>
  
  <p>How can I access the data sent by AJAX and update the note object?</p>