On Feb 6, 11:05 pm, toomim <[EMAIL PROTECTED]> wrote: > I don't understand, how do I get {{sep}} to change from ',' to 'and' > and then to the empty string in the last 2 iterations of the loop, > without using a bunch of if statements? (And since we're using > variables, a {% where %} clause?)
Here's my code, if it helps: {% for pubauthor in pub.pubauthor_set.all %} <a href="{{ pubauthor.author.homepage_url }}">{{ pubauthor.author }}</ a>{% if forloop.last %}{% else %}{% ifequal forloop.revcounter 2 %} and {% else %}, {% endifequal %} {% endif %} {% endfor %} --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---