def short_timesince(date):
    """
    A shorter version of Django's built-in timesince filter.
    Selects only the first part of the returned string,
    splitting on the comma.

    Falls back on default Django timesince if it fails.

    Example: 3 days, 20 hours becomes "3 days".

    """
    try:
        t = timesince(date).split(", ")[0]
    except IndexError:
        t = timesince(date)
    return t
def short_timesince ( date ) : try : t = timesince ( date ) . split ( ", " ) [ 0 ] except IndexError : t = timesince ( date ) return t
A shorter version of Django's built-in timesince filter.
    Selects only the first part of the returned string,
    splitting on the comma.

    Falls back on default Django timesince if it fails.

    Example: 3 days, 20 hours becomes "3 days".