PHP's form bracket trick is to Django's ___?
- by Matt
In PHP you can create form elements with names like:
category[1]
category[2]
or even
category[junk]
category[test]
When the form is posted, category is automatically turned into a nice dictionary like:
category[1] => "the input value", category[2] => "the other input value"
Is there a way to do that in Django? request.POST.getlist isn't quite right, because it simply returns a list, not a dictionary. I need the keys too.