JA wrote:
This is not possible by design: Django tries to keep templates off becoming a programming language. You need to prepare the resulting list in your view and then pass it to a template:What I would like to do, is display an entry of thumbNames based on the value of dirName. Something like: {% for dirName in dirList %} {{ dirName }} - {{ thumbNames.{{ dirName }} }} {% endfor %}
Context(...{ 'dirList':[thumbNames[dirName] for dirName in dirList], })