problem with request.GET.getlist['choices']

210 views
Skip to first unread message

faypy

unread,
Oct 29, 2007, 4:32:21 PM10/29/07
to Django users
hi
using django 0.96.1 &
sending forms checkbox values as choices ,
but none of these works :

request.POST.getlist['choices']
request.GET.getlist['choices']

error:
'instancemethod' object is unsubscriptable

but these works:
request.POST['choices']
request.GET['choices']
& give the the LAST CHOICE that made
i should mention that html page correctly send choices=1&choices=2,...

thank u

James Bennett

unread,
Oct 29, 2007, 4:35:05 PM10/29/07
to django...@googlegroups.com
On 10/29/07, faypy <fara...@gmail.com> wrote:
> sending forms checkbox values as choices ,
> but none of these works :
>
> request.POST.getlist['choices']
> request.GET.getlist['choices']

Perhaps you should pause to work through a Python tutorial.

--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

faypy

unread,
Oct 29, 2007, 4:39:12 PM10/29/07
to Django users
what do u mean?
there is no pause in between...


On Oct 29, 11:35 pm, "James Bennett" <ubernost...@gmail.com> wrote:

Matthias Kestenholz

unread,
Oct 29, 2007, 4:48:34 PM10/29/07
to django...@googlegroups.com, faypy
On 29.10.2007, at 21:39, faypy wrote:

>
> what do u mean?
> there is no pause in between...
>

He is saying that you should really, really take the time to learn
python before
trying to do anything with django.

(Hint: you need getlist() , not getlist[] , but the fact you did not
see this error should
really tell you something: That you need to learn Python first.


--
http://spinlock.ch/blog/


faypy

unread,
Oct 29, 2007, 4:54:35 PM10/29/07
to Django users
thanks in advance
i know i made a bad mistake,
but it's 00:23 , & mind is tired .
no need for python tuturial . lol
thank u anyway

Kenneth Gonsalves

unread,
Oct 29, 2007, 10:02:33 PM10/29/07
to django...@googlegroups.com

On 30-Oct-07, at 2:18 AM, Matthias Kestenholz wrote:

> He is saying that you should really, really take the time to learn
> python before
> trying to do anything with django.

s/before/while/

--

regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/


Reply all
Reply to author
Forward
0 new messages