我有一个list of dictionary
in python 即
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'}]
我想listofobs
在 Django 模板中使用变量的所有键和值。例如:
对于第一次迭代:
timestamp = 7 july 2012, 12:39 Am
ip = 1.4.128.0
user = lovestone
对于第二次迭代:
timestamp = 7 july 2012, 12:40 Am
ip = 192.168.21.45
user = b
等等 ..