"dishList" is a list of "dish" object and "dish" object includes an "id" field. For example:
dishList = [dish1, dish2, dish3, ...]
dish1.id = 1
"dishCount" is a dictionary type in python, which include a number for each dish. For example:
dishCount = { dish1.id: 0, dish2.id: 0, ...}
My problem is that in this for loop:
{% for d in dishList %}
How can I assess the number of dish "d"?
I want to use {{ dishCount.(d.id) }}
but it is not working.
Could not parse the remainder: '(d.id)' from 'dishCount.(d.id)'