from django import template register = template.Library() @register.filter def replace(value, cherche, remplacement): retur
Heres a bad idea but works:
{{ xml|input_by_xpath:"{'type':'radio','xpath':'//result/value'}" }}
and
@register.filter def input_by_xpath(device, args): args = eval(args) ... result = ""%(args['type'],value,args['xpath']) return mark_safe(result)