Hi Folks,

in views:

return render_to_response('tliste/import.html', {'data':
allWrongData})

allWrongData is a list of Dictonaries of lists

for instance

[{"key" : ["Text one", "Text two"]}, {"key1" : ["Text three", "Text
for"]}]...

In the template I try:

{% for item in data %}
    {{ item }}
     <br>
{% endfor %}

shows

{'key': [u'MTK-NU 0032', 'max. 25 Zeichen erlaubt']}
{'key1': [u'LDS-PS 205', 'max. 25 Zeichen erlaubt']}

but trying

         {{ item["key"][0] }}

to show first Element - here 'MTK-NU 0032'

brings an error message:

Could not parse the remainder: '["key"][0]' from 'item["key"][0]'

same with index = [1]

What goes wrog?

Thx
Timothy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to