On Tue, Nov 25, 2008 at 7:21 PM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> If GET or POST contain a list, I only see the last value in the debug view.
>
> What do you see on an uncaught excepion with e.g. "?foo=1&foo=2" as
> query string?

It depends on how you try to access the values. request.GET and
request.POST aren't normal dictionaries - they are QueryDicts. As you
have noticed, if you use normal array subscription (i.e.,
request.GET['foo'] ), you will retrieve the last value that was
submitted. However, if you ask for request.GET.getlist('foo'), you
will get the list of all values that have been assigned to foo.

There are a number of other nifty tricks that you can do with
QueryDict; for more details, see the docs:

http://docs.djangoproject.com/en/dev/ref/request-response/#querydict-objects

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to