I am trying to use a 'dotted variable' (forloop.counter in this case)
as an index to a list, but without success so far.

I have a list of strings called 'table_string' and the following code:
{% for d in day_list %}
     <tr><td>{{d}}</td><td>{{table_string.forloop.counter}}</td></tr>
{% endfor %}

What I'm trying to do is render the table_string item (indexed 1-7)
for the appropriate day using the forloop.counter variable, but I am
getting no result (or at least the TEMPLATE_STRING_IF_INVALID).

Can someone please suggest what I need to do to use a variable
attribute as the attribute to another variable?

Travis

--~--~---------~--~----~------------~-------~--~----~
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