1. indifex
  2. transifex

Commits

Andreas Loupasakis  committed 882d33f

A simple templatetag to wrap the size_human utility method.

- This was needed by some addon.

  • Participants
  • Parent commits 524a611
  • Branches default

Comments (0)

Files changed (1)

File transifex/txcommon/templatetags/txcommontags.py

View file
  • Ignore whitespace
         return ''
 
 @register.filter
+def size_humanize(value):
+    """Return a more human readable size number with the appropriate unit type."""
+    return txcommon.utils.size_human(value)
+
+@register.filter
 def strip_tags(value):
     """Return the value with HTML tags striped."""
     return txcommon.rst.strip_tags(value)