Re: list indices must be integers not unicode

2011-02-18 Thread Burhan
id_list = [int(x) for x in data.keys() if x.isdigit()] -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@go

Re: list indices must be integers not unicode

2011-02-18 Thread gladys
 pm, Chris Matthews wrote: > > > > > > Then you probably want: > > > > >     id_list = [int(x) for x in data.keys()] > > > > > > -Original Message----- > > > > > From: django-users@googlegroups.com > > > > > [mailto:dj

Re: list indices must be integers not unicode

2011-02-18 Thread balu
Feb 18, 5:06 pm, Chris Matthews wrote: > > > > > Then you probably want: > > > >     id_list = [int(x) for x in data.keys()] > > > > > -Original Message- > > > > From: django-users@googlegroups.com > > > > [mailto:django-user

Re: list indices must be integers not unicode

2011-02-18 Thread balu
ote: > > > > > Then you probably want: > > > >     id_list = [int(x) for x in data.keys()] > > > > > -Original Message- > > > > From: django-users@googlegroups.com > > > > [mailto:django-users@googlegroups.com] On Behalf Of balu &

Re: list indices must be integers not unicode

2011-02-18 Thread balu
e: > > > > Oh and you probably wanted: > > > > >     if request.method=="POST": > > > > >         data = request.POST > > > > >        id_list = [int(x) for x in data.values()] > > > > >        questions = MyModel.obj

Re: list indices must be integers not unicode

2011-02-18 Thread Burhan
= [int(x) for x in data.keys()] > > > -Original Message- > > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] > > On Behalf Of balu > > Sent: 18 February 2011 13:56 > > To: Django users > > Subject: Re: list indices must be integers no

Re: list indices must be integers not unicode

2011-02-18 Thread balu
ge- > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On > Behalf Of balu > Sent: 18 February 2011 13:56 > To: Django users > Subject: Re: list indices must be integers not unicode > > Thank you Chris Matthews for your reply. > > I'm working on

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
Then you probably want: id_list = [int(x) for x in data.keys()] -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of balu Sent: 18 February 2011 13:56 To: Django users Subject: Re: list indices must be integers not unicode Thank

Re: list indices must be integers not unicode

2011-02-18 Thread balu
Of Chris Matthews > Sent: 18 February 2011 13:34 > To: django-users@googlegroups.com > Subject: RE: list indices must be integers not unicode > > Hi Balu, > > Numeric data from the form must be converted to int. I suspect you wanted to > index data; not id_list. > >     i

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
f Of Chris Matthews Sent: 18 February 2011 13:34 To: django-users@googlegroups.com Subject: RE: list indices must be integers not unicode Hi Balu, Numeric data from the form must be converted to int. I suspect you wanted to index data; not id_list. if request.method=="POST&

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
1 13:24 To: Django users Subject: list indices must be integers not unicode Hi all :) I'm processing a user submitted form. In that the user will answer a series of multiple choice questions. Depending on the question "id" which are submitted I'll find the compare the valu

list indices must be integers not unicode

2011-02-18 Thread balu
from the dictionary request.POST. But it is showing an error the list indices must be integers not unicode. I wrote the code as follows. // In the view function if request.method=="POST": data = reques.POST temp_list = data.keys() id_list =