List Info

Thread: Weird problem with request.POST, correct data not coming out from request.POST




Weird problem with request.POST, correct data not coming out from request.POST
user name
2007-12-18 12:14:34
I am trying to get a value from request.POST. After form
submit,
request.POST contains the values of the ids from the
checkbox
selected. I want the list of those ids. SO I am doing
something like,
entry_ids = request.POST['delete'] , but this doesnot pick
the list,
but instead gets me the last value in the list!

This is my code snippet.

	elif request.POST.has_key("del"):
           entry_ids = request.POST['delete']
   	   print request.POST
	   print entry_ids

And this is the output.
<QueryDict: {u'del': [u'del'], u'delete': [u'5', u'8',
u'9']}>
9
What am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )