I'm assuming that the part the doesn't work is {{ user.item }}
.
Django will be trying a dictionary lookup, but using the string "item"
and not the value of the item
loop variable. Django did the same thing when it resolved {{ user.name }}
to the name
attribute of the user
object, rather than looking for a variable called name
.
I think you will need to do some preprocessing of the data in your view before you render it in your template.