title: Return multiple variables from an django ajax function
body: <p>I'm building a Django todo list.  The checkboxes to mark a task as complete have ajax:</p>
  
  <pre><code>//Checkbox toggles
  $('input:checkbox').click(function() {
      if ($(this).attr('checked')) {
          $action = true;
      } else {
          $action = false;
      }
  
      $.ajax({
          type: "POST",
          url: "/gtd/action/" + this.id.split("_")[1] + "/" + $(this).val() + "/" + $action + "/",
          success: function(data) {
              //Update entire gtd side menu
          }
      })
  });
  </code></pre>
  
  <p>In the success portion of the ajax, I need to update multiple variables in a side menu (pertaining to the count of incomplete tasks).  The django view can calculate the variables</p>
  
  <pre><code>def ajax_click(request, modelname, id, type, toggle):
  
      #Do some stuff to save the object
  
      action_count = actions = Action.objects.filter(complete=False, onhold=False).count()
      hold_count = Action.objects.filter(onhold=True, hold_criteria__isnull=False).count()
  
      return HttpResponse('')
  </code></pre>
  
  <p>The question is, how do I pass more than one variable back to the ajax function?  In this instance, I have action_count and hold_count.  How can I get these variables back to the success function?</p>