This would be easier if you used your database's date formatting functions to strip off the times (in the select). You can then group by the formatted column (using a column alias).
After that, you can use a loop with a little logic to transpose the results to what you want. I haven't used django's template system yet, but here's what the logic would look like in Python:
>>> rows = [(1,'2009-01-01'), (2,'2009-01-01'), (3, '2009-02-02'), \
(4, '2009-02-02'), (5, '2009-02-02')]
>>> topdate = None
>>> for r in rows:
... if topdate <> r[1]:
... topdate = r[1]
... print r[1]
... print r[0]
...
2009-01-01
1
2
2009-02-02
3
4
5
There should be a straight-forward way to convert this to django template code.