예제 #1
0
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)
예제 #2
0
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)
예제 #3
0
def truncate_words(*args, **kwargs):
    return _truncate_words(*args, **kwargs)
예제 #4
0
def truncate_words(*args, **kwargs):
    return _truncate_words(*args, **kwargs)