Hi all, I'm having a couple of issues getting django templating for loop tag to go through this dictionary:
It is definitely being passed to the page ok as if I just do:
{% for event in events %}
{{ event }}
{% endfor %}
it writes 1,2,3 but when I try and do {{ event.start }} it just doesn't output anything...
evs = {
"1": {
'start': '8:00:00',
'end': '9:00:00',
'name': 'test',
'description': 'test',
'image_url': 'http://test',
'channel_url': 'http://test',
},
"2": {
'start': '8:00:00',
'end': '9:00:00',
'name': 'test',
'description': 'test',
'image_url': 'http://test',
'channel_url': 'http://test',
},
"3": {
'start': '8:00:00',
'end': '9:00:00',
'name': 'test',
'description': 'test',
'image_url': 'http://test',
'channel_url': 'http://test',
}
}
And this is my django code in the template:
{% for event in events %}
{{ event.end }}
{{ event.name }}
{{ event.description }}
{{ event.image_url }}
{{ event.channel_url }}
{% endfor %}
Any help would be really appreciated!
Thanks