On 12/19/05, plisk <[EMAIL PROTECTED]> wrote:
> Is it expected behaviour when opening /foo/?test=1 request.GET['test']
> returns 1, but request.GET returns {'test': ['1']}, where '1' is
> enclosed in the list ? Shouldn't it also be just {'test': '1'} ?
> Because of this you can see on the add forms in admin in text fields
> values like ['bar'] when opening them with GET param
> ...obj/add/?name=bar and also preselect from GET params of fields with
> foreign keys is not working.
> Something should be fixed, but i don't know what is broken, more
> logical to me seems that request.GET(and i guess POST too) is a proper
> candidate. Any comments ?

This is expected behavior. The request.GET and request.POST variables
are instances of the QueryDict class, in which each key can have more
than one value. Read the documentation here:

http://www.djangoproject.com/documentation/request_response/#querydict-objects

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to