Ok, thank you!

2014年5月21日水曜日 15時04分09秒 UTC+9 Erik Cederstrand:
>
> Den 21/05/2014 kl. 05.21 skrev hito koto <[email protected]<javascript:>>: 
>
>
> > Hello, 
> > 
> > I have the following errors: why append is not done? 
> > 
> >     row = [[0 for i in range(5)] for i in range(31)] 
>
> Here you are creating a list of lists of 0's (a 2-dimensional matrix of 
> ints). 
>
> >     for a in obj_all.filter().values_list('user_id'): 
> >         row[0][0].append(a) 
>
> Here, row[0][0] points to an int. You can't append to an int. Without 
> knowing what you want to achieve, either initialize your list of lists with 
> lists instead of 0's, or do "row[0][0] += a" instead. 
>
> >     for b in obj_all.filter().values_list('contact_date'): 
> >         row[0][1].append(b) 
> >     for c in obj_all.filter().values_list('contact_time'): 
> >         row[0][2].aapend(c) 
>
> Spelling error. 
>
> Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/04ec63ce-d278-43da-ad78-f7d151defd61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to