def get_short_message(self, words=8): """ Trims message to the specified number of words. Good for use in the admin. """ return truncate_words(strip_tags(self.message), words)
def teaser(self): if self.description: return self.description if self.cleaned_text: return truncate_words(striptags(self.cleaned_text), 50) return u'None available.'
def testimonial_parsed(self, obj): testimonial = strip_tags(obj.testimonial) testimonial = truncate_words(testimonial, 50) return testimonial