On 12/20/06, Austin Govella <[EMAIL PROTECTED]> wrote:
Is there an easy way to output that as: "foo, bar, and twinky"
(There are handy functions for this in PHP, ColdFusion, and Rails, but
my Google-fu fails for Python or Django.)
As far as template logic is concerned, I do something similar on my
blog to list the categories each post is in; I just use the {% for %}
tag to loop over the list of categories, and added a couple checks to
determine whether to put a comma after each one and where to put the
'and' (using tests for 'forloop.last' within the loop).
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---