def servings(self): """Return a string indicating the yield or serving size of this recipe. """ string = "%d" % self.num_portions if self.portion: if self.num_portions > 1: string += " %s" % pluralize(self.portion) else: string += " %s" % self.portion return string
def __unicode__(self): return "%g %s %s" % (self.quantity, pluralize(self.unit), self.food_group)
def __unicode__(self): if self.to_quantity > 1.0: to_unit = utils.pluralize(self.to_unit) else: to_unit = self.to_unit return u"1 %s = %g %s" % (self.unit, self.to_quantity, to_unit)