Example #1
0
 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)
Example #2
0
    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.'
Example #3
0
 def testimonial_parsed(self, obj):
     testimonial = strip_tags(obj.testimonial)
     testimonial = truncate_words(testimonial, 50)
     return testimonial
Example #4
0
 def testimonial_parsed(self, obj):
     testimonial = strip_tags(obj.testimonial)
     testimonial = truncate_words(testimonial, 50)
     return testimonial