Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Humanizing sentence when using pluralize in Django

What is the best way to define is/are in a sentence that uses the Django template pluralize filter? For example:

<p>
    Your item{{ items|length|pluralize }}
    is/are
    currently being processed and will ship soon.
</p>
like image 537
tomcounsell Avatar asked Nov 22 '13 12:11

tomcounsell


1 Answers

As shown in last example of pluralize, you can try

Your item{{ items|length|pluralize:" is,s are" }}
currently being processed and will ship soon.
like image 172
Rohan Avatar answered Nov 08 '22 07:11

Rohan