hro.py 219 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
from django.template import Library


register = Library()


@register.filter
def get_text(human_readable, user):
    if human_readable is None:
        return u""
    else:
        return human_readable.get_text(user)