My question is almost exactly the same as this post, except that I'm using Python and Django instead of PHP.
The task is to take:
id date
1 2009-01-01 10:15:23
2 2009-01-01 13:21:29
3 2009-01-02 01:03:13
4 2009-01-03 12:20:19
5 2009-01-03 13:01:06
And output:
2009-01-01
1
2
2009-01-02
3
2009-01-03
4
5
I can manually hack something together by looping through the sorted dates and outputting HTML into a string in my python view file, but I'm wondering: is there's a better way using a Django template or a nifty Python feature?