I am working through the Django tutorial and I have come across some syntax
I am unfamiliar with.  From the context it makes perfect sense what it
does, but I haven't seen it before and was wondering if it is documented
anywhere (BTW I see other examples in the Django documentation, like date
formatting for example).

So what is this "|pluralize" syntax? Thanks in andvance

<h1>{{ poll.question }}</h1>
<ul>{% for choice in poll.choice_set.all %}
    <li>{{ choice.choice_text }} -- {{ choice.votes }} vote{{
choice.votes|pluralize }}</li>{% endfor %}</ul>
<a href="{% url 'polls:detail' poll.id %}">Vote again?</a>


-- 
Mark :)
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to