You've passed in a tuple to your template and now you're trying to access the separate indexes/items in a loop. Here's the tuple:
REGIONS = ( (1, 'East'), (2, 'West'), (3, 'South') )
And this is how you'd unpack/decode it in your Django template:
for id, region in REGIONS:
print 'id: %s, region: %s' %(id, region)
If only everything was that easy.
Share on Twitter
Share on Facebook