I'm trying to do something in a template that seems really simple ... 
populate the row/columns of a table and apply alignment for each field. 
  So I'm doing this:

             {% for row in report_data %}
                 <tr>
                   {% for col in row %}
                     <td align="{{ align.forloop.counter0 }}">
                         {{ col }}
                     </td>
                   {% endfor %}
                 </tr>
             {% endfor %}

I'm trying to use the 'forloop.counter0' to get at which column I'm 
currently populating so I can apply the appropriate alignment according 
to the list contained in align.  Align is a tuple of alignments:

   align = ("Center", "Right", "Left", "Center")

So how does one actually make use of the forloop.counter0 variable?

Or is there some other way to get at my 'align' list?

Thanks,
Michael

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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