Hi, If i do for key in request.POST.keys(): print request.POST[key] Over this (which is the result of print request.Post): <QueryDict: {u'hix': [u'Monatsreport'], u'my_choice_field': [u'2', u'29', u'42']}> I get: Monatsreport 42 Should I not get lists ? i.e: [Monatsreport] [2,29,42] I need those other information from 'my_choice_field' how do I get them ? Help would be much appreciated. Best regards
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
XSLT Developer
LexisNexis
A-1030 Wien, Marxergasse 25
patric...@lexisnexis.at
Tel.: +43 1 53452 1573
Fax: +43 1 534 52 146
No, multidicts generally conform to the dict interface (mapping a
key to a value) as it's the most useful way to interact with POSTDATA
(or GETDATA for that matter): people will generally map a single value
to each key and having to unpack that value all the time is a pain.
If you want to get all values for the key, as the documentation
indicates[0] you should use the `getlist` method.
[0] https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.getlist
. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
XSLT Developer
LexisNexis
A-1030 Wien, Marxergasse 25
mailto:patric...@lexisnexis.at
Tel.: +43 1 53452 1573
Fax: +43 1 534 52 146
-----Ursprüngliche Nachricht-----
[0] https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.QueryDict.getlist
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Should I not get lists ?
i.e:
[Monatsreport]
[2,29,42]
Lists are ordered, I think you are confusing something :)
Cheers
Tom