Kirby
I wrote the function in my Product class in my models.py:class Product(models.Model):title = models.CharField(max_length=220)description = models.CharField(max_length=3000, null=True, blank=True)price = models.DecimalField(max_digits=1000, decimal_places=2, null=True, blank=True)slug = models.SlugField()timestamp = models.DateTimeField(auto_now_add=True, auto_now=False)updated = models.DateTimeField(auto_now_add=True, auto_now=False)active = models.BooleanField(default=True)def __unicode__(self):return self.titleclass Meta:ordering = ['title',]def shorten_words(self):if len(self.description) > 20:print self.desciption[0:20]else:print self.desciptionand I added a code in my products.html page:{{ product.description.shorten_words() }}