I want to create a multi-dimentional arry in a form element and
convert that to a list of dicts.
My form element looks like this:
<input type="checkbox" value="{{result.CODE}}" name="search
[{{result.NAME}}]">
What I was hoping to have was an arry named search with a key of
result.NAME and a value of result.CODE that looks like this:
search
[
NAME1=>CODE1
NAME2=>CODE2
]
It looks like the name and value fields are not being passed as an
array but as literal string in a dict. where the key is "search[NAME]"
and the value is CODE like this:
{"search[NAME]":"CODE"}
Also I am not sure how to access this in the view.py file.
I am doing this currently:
result=request.POST
Any help on this wold be appreicated!
Thanks for the help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---