Hello guys, i am working on a view where i m needed to pass an array of 
objects into a ajax request.
the array of java script objects is like this
                                                              
 [{'que':1,'ans':3},{'que':1,'ans':2},{'que':4,'ans':5},{'que':2,'ans':4}]
i posted is in ajax request like

      $.ajax({
                  url:'/someurl/',
                  type:'POST',
                  data:{'array':[{'que':1,'ans':3},{'que':1,'ans':2},
{'que':4,'ans':5},{'que':2,'ans':4}]},
                  success:function(data){},
                  error:function(data){}
})

but when i recieve it in view using
                                                    
 request.POST.get('array') or
                                                    
request.POST.getlist('array') 
or 
                                                   
request.POST.getlist('array[]') 
  It gives me a blank list not the data i have sent with the request.


tell me how can i get this data in django view.
any help would be appreciable 







 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to