I have a list of dictionary in python ie
listofobs = [{'timestamp': datetime.datetime(2012, 7, 6, 12, 39, 52), 'ip': u'1.4.128.0', 'user': u'lovestone'}, {'timestamp': datetime.datetime(2012, 7, 6, 12, 40, 32), 'ip': u'192.168.21.45', 'user': u'b'}]
I want to use all the keys and the value of the listofobs variable in a Django template. For instance:
For the first iteration:
timestamp = 7 july 2012, 12:39 Am ip = 1.4.128.0 user = lovestone
and for the second iteration:
timestamp = 7 july 2012, 12:40 Am ip = 192.168.21.45 user = b
etc.
source share