0
나는사전
{
date:{title1:[obj1, obj2, obj3], title2:[obj1, obj2, obj3]},
date2:{title1:[obj1, obj2, obj3]},
}
이며 다음 값
images={'25/02/2014': {u'Observation': [<Image: Image object>]}}
구성 할 수있는 사전을 가지고 있고 각각의 타이틀에 대해 개별적으로 결국 개체 목록을 값에 액세스 할 . 내 코드는
{%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%}
이었지만 작동하지 않습니다. 그것은 python에서 dictionalry는 작동하지만 django template에서는 작동하지 않습니다. 사전에 어떻게 액세스 할 수 있습니까?
http://goo.gl/Evves1 제발 close..Sorry ... 여기를 발견! – Apostolos