How do I add multiple arguments to my custom template filter in a django template?
问题 Here's my custom filter: from django import template register = template.Library() @register.filter def replace(value, cherche, remplacement): return value.replace(cherche, remplacement) and here are the ways I tried using it in my template file that resulted in an error: {{ attr.name|replace:"_"," " }} {{ attr.name|replace:"_" " " }} {{ attr.name|replace:"_":" " }} {{ attr.name|replace:"cherche='_', remplacement=' '" }} I looked into django's docs and book but only found example using a