@register.filter()
def startswith(value, arg):
 return str(value).startswith(arg)

@ register . filter ( ) def startswith ( value , arg ) : return str ( value ) . startswith ( arg )
test whether a string starts with the given argument .