@register.tag('filter')
def do_filter(parser, token):
    _, rest = token.contents.split(None, 1)
    filter_expr = parser.compile_filter("var|%s" % (rest))
    for func, unused in filter_expr.filters:
        if getattr(func, '_decorated_function', func).__name__ in ('escape', 'safe'):
            raise TemplateSyntaxError('"filter %s" is not permitted.  Use the "autoescape" tag instead.' % func.__name__)
    nodelist = parser.parse(('endfilter',))
    parser.delete_first_token()
    return FilterNode(filter_expr, nodelist)
Filters the contents of the block through variable filters.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/template/defaulttags.py/do_filter