Template Tags

Simple Tags

tom_common.templatetags.tom_common_extras.comments_enabled()

Returns the TOM setting specifying whether or not comments are enabled

tom_common.templatetags.tom_common_extras.verbose_name(instance, field_name)

Displays the more descriptive field name from a Django model field

Inclusion Tags

tom_common.templatetags.tom_common_extras.recent_comments(limit=10)

Displays a list of the most recent comments in the TOM up to the given limit, or 10 if not specified.

Filters

tom_common.templatetags.tom_common_extras.truncate_number(value)

Truncates a numerical value to four decimal places for display purposes. Etienne Bachelet advised that three decimal places was insufficient precision, but that four would be more acceptable.