0
我有可能由下列值字典在Django模板
images={'25/02/2014': {u'Observation': [<Image: Image object>]}}
是
{
date:{title1:[obj1, obj2, obj3], title2:[obj1, obj2, obj3]},
date2:{title1:[obj1, obj2, obj3]},
}
的字典,我想單獨和最終訪問值爲每個標題的對象列表。我的代碼是
{%for date in images%}
{%for title in images.date%} #equivalent to for title in images[date]:
{{date}} - {{title}}
{% for obj in images.date.title%} #equivalent to for obj in images[date][title]: but not sure
{{obj}}
{%endfor%}
{%endfor%}
{%endfor%}
但它不起作用。它適用於dictionalry的python,但不適用於django模板。我怎樣才能訪問字典?
http://goo.gl/Evves1發現在這裏......請close..Sorry! – Apostolos