title: get the javascript array in django
body: <p>here is my code:</p>
  
  <p><strong>urls.py:</strong></p>
  
  <pre><code>from django.conf.urls import patterns
  from views import show,showpage
  
  urlpatterns = patterns('',
                         (r'^$',showpage),
                         (r'^show/$',show),
  )
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.http import HttpResponse
  def show(request):
    arr = reqeust.GET.get('arr','Nothing')
    print arr#**it's 'Nothing'**
    if arr == 'Nothing':
      msg = 'fail'
    else:
      msg = 'pass'
    return HttpResponse(msg)
  
  def showpage(request):
    html = '''    &lt;html&gt;
  &lt;head&gt;
  &lt;script language="javascript" type="text/javascript" src="/site_media/js/jquery-1.7.2.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;input type="button" id="input_btn"/&gt;
  &lt;/body&gt;
  &lt;script language="javascript" type="text/javascript"&gt;
  $(function(){
    $("#input_btn").bind("click",function(){
      arr = [1,2,3,4,5,6]
      $.ajax({
        type:"GET",
        url:"/show/",
        data:{arr:arr},//**I want pass the arr to django**
        success:function(data){alert(data);},
        error:function(data){alert(data);}
      });
    });
  })
  &lt;/script&gt;
  &lt;/html&gt;'''
    return HttpResponse(html)
  </code></pre>
  
  <p>when I access <strong>localhost:8000</strong>,and click the button,I got 'Nothing' printed in the backend console,as you know I got message 'fail' in the frontend</p>
  
  <p>uh..can anybody sovle this problem,I want get the code (<code>arr = reqeust.GET.get('arr','Nothing')</code>) which return a list(<code>[1,2,3,4,5,6]</code>) or something like this</p>
  
  <p>---------append1-------</p>
  
  <p>I got this in the console when I click the btn</p>
  
  <p><strong>[12/Jun/2012 09:48:44] "GET /show/?arr%5B%5D=1&amp;arr%5B%5D=2&amp;arr%5B%5D=3&amp;arr%5B%5D=4&amp;arr%5B%5D=5&amp;arr%5B%5D=6 HTTP/1.1" 200 4</strong></p>
  
  <p>---------apend2-------</p>
  
  <p>I fixed my code like this:</p>
  
  <pre><code>arr = request.GET.get('arr[]','Nothing')
  </code></pre>
  
  <p>and I got 6 which is the last one of the javascript array,how can I get the whole array?</p>
  
  <p>thanks advance!</p>