Friday, November 19, 2010

forloop.last FAIL in template.

Hi everyone,

I have a template where Django is spitting out blog tags followed by a ',' when the tag is not the final one in the loop.

{% if not forloop.last %}, {% endif %}

Strangely, I am still seeing tag1, tag2, tag3,. How can I suppress that last ','?

--
Regards,
Sithembewena Lloyd Dube
http://www.lloyddube.com

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate