Den 21/05/2014 kl. 05.21 skrev hito koto <hitokoto2...@gmail.com>: > 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/E9B38CD2-1D77-4D04-888C-2AE611EF0322%40cederstrand.dk. For more options, visit https://groups.google.com/d/optout.