Hi,
My model is :
id val msg
20 1234 text
20 1245 text
20 1275 text
20 1356 text
so I have to display record in calendar format.
I am doing it in this way:
final_list =[]
somelist = [1200, 1250, 1300, 1350, 1400]
val = 0
i = iter(range(5))
testing_list =[]
for item in i:
user_status_list = UserStatus.objects.filter(id =20,time__gte
= somelist[val], time__lte = somelist[val+1))
for item in user_status_list:
testing_list.append(item)
final_list.append(testing_list)
so my final list should look like:
[ [ [20, 1234, sdfs], [20, 1245, sdffd] ], [ 20,1275, dfdfgf], [ ],
[20, 1356, dsfdf] ]
wanted to know How can I use this list in my template.
for item in final_list:
for val in item:
print val.id, val.val, val.msg
which is wrong.
how can I fix this.
thanks...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---