Django manytomany in template format

In one of my models I have a categories field that is a manytomany configuration.

I was wondering how to get the following output in the template.

Category 1, Category 2, Category 3 and Category 4

So basically separate each category with a comma, apart from the last one that then gets replaced with a "and"

10
задан ApPeL 7 February 2011 в 06:58
поделиться