import ast

from knights.library import Library

register = Library()


@register.tag
def static(parser, token):
    src = parser.parse_expression(token)
    return ast.Yield(value=ast.BinOp(
        left=ast.Str(s='/static/%s'),
        op=ast.Mod(),
        right=src,
    ))


@register.tag(name='include')
def do_include(parser, token):
    return ast.Yield(value=ast.Str(s='{include %s}' % token))

@@ -396,8 +396,66 @@
 token))%0A
+%0A%0A@register.helper%0Adef safe(value):%0A    return str(value)%0A

Add a dummy safe filter for Django compat