The horizon.utils.filters ModuleΒΆ

horizon.utils.filters.parse_isotime(timestr, default=None)[source]

This duplicates oslo timeutils parse_isotime but with a @register.filter annotation and a silent fallback on error.

horizon.utils.filters.replace_underscores(string)[source]
horizon.utils.filters.timesince_or_never(dt, default=None)[source]

Call the Django timesince filter, but return the string default if dt is not a valid date or datetime object. When default is None, “Never” is returned.

horizon.utils.filters.timesince_sortable(dt)[source]

Previous topic

The horizon.utils.memoized Module

Next topic

The horizon.utils.lazy_encoder Module

Project Source

This Page