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(context, limit=10)
Displays a list of the most recent comments in the TOM up to the given limit, or 10 if not specified.
Comments will only be displayed for targets which the logged-in user has permission to view.
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.