On Sep 12, 1:04 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > [OT question: Why does top-posting seem to be the default response mode on > this list?] > As a follow-up to this question, how would one cast the output as a table > where the major field is only displayed on change. I.e., how to produce > tabular output of the form > > Widgets Widget 1 > Widget 2 > Widget 3 > Wodgets Wodget 1 > Wodget 2 > Wodget 3 > > regards > Steve
You need the ifchanged tag: <table> {% for items in list %} <tr><td>{% if changed items.0 %}{{ items.0 }}{% endifchanged %}</ td><td>{{ items.1 }}</td></tr> {% endfor %} </table> -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---