开发者

Django recive array ajax problem

开发者 https://www.devze.com 2023-03-21 18:08 出处:网络
I\'m sending array via POST r开发者_StackOverflow社区eqest to Django server if I use dev server, I see

I'm sending array via POST r开发者_StackOverflow社区eqest to Django server if I use dev server, I see

 <QueryDict: {u'arr[]': [u'1', u'2']}>

if I send to Apache+Mod_wsgi sever, I see

 <QueryDict: {u'arr[]': [u'2']}>

olny last item, any ideas?

upd: dev sever on my local pc, if Apache+mod_wsgi on my local pc all fine, if on remote - only last item


My solution: serialize array with JSON2

JSON.stringify(my_array)

and deserialize with

import json
json.loads(str)
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号