Monday, August 18, 2014

Help, strange problem with 'getlist'

I got problem with django request.POST.getlist('data'). In template, There are multiple <input name="data"> tags, and I use getlist in view.py to get the list.
everything was fine in my develop environment and I got a list. But when it got deploy on server, (code same), I only get the last element instead of the whole list. 
Why? The post data (F12 - Network) in browser is list with all data, but POST.getlist() just a list contains the last element in views.py How did this happen?

--
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+unsubscribe@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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d5c1ad23-74b7-4a3e-b37c-331890f575e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment