title: passing a javascript array to a django view
body: <p>I'm using django and have a page of search results that I want to be able to filter by category with ajax (jquery) requests.  There's a filter bar on the side of the page and when someone selects certain categories and clicks submit, those corresponding results should show up on the page.  My code looks something like this:</p>
  
  <pre><code>&lt;input type="checkbox" name="category1" value="1" /&gt;
  &lt;input type="checkbox" name="category2" value="2" /&gt;
  &lt;input type="button" name="submit" onclick="{
      var cats = new Array();
      $(input[type=checkbox]:checked).each(function() {
          cats.push($(this).val());
      });
      $.getJSON('page.html', {'cats':cats}, function(data) {...});
  }" /&gt;
  </code></pre>
  
  <p>But in the django view when I try to read the cats array it returns a 500 error.  I can, however, pass scalars and strings to the django view with no problem.</p>
  
  <p>Any thoughts?  Is there a more elegant jQuery way to do this without using a javascript array?</p>