Hi, My model is:
20 1234567890 'some mdg'
20 4597434534 'some msg2'
20 3453945934 'sdfgsdf'
10 4503485344 'ddfgg'
so I have to display them in calender format. so my query is how to go do this. What I am thinking is : example may 2009
somelist = [1,2,3,4,5,6,7,8,9......... 31]
newlist = []
for item in somelist:
mystr = item + '-' +'05' + '-' + '09'
** doing it to get in 1-05-09 format
val = int(time.mktime(time.strptime(mystr, "%d-%m-%y")))
newlist.append(val)
for item in newlist:
list = Status.objects.filter(someid = 20, time < item[item+1], value > item)
and pass list to the template. what I am doing here is wrong. How to fix it.
thanks