def short_desc(event, words=25, strip_html=False): """Takes an event object and returns a shortened description.""" if event.short_description: return event.short_description description = event.description if strip_html: description = html_to_text(description) return _truncate_words(description, words)
def truncate_words(*args, **kwargs): return _truncate_words(*args, **kwargs)