I have a custom filter that looks like this
register = template.Library()
@register.filter
def makebreadcrumbs(value, arg):
pass
How can I pass multiple arguments to the filter?
{% with request.resolver_match.namespace as name_space %}
{{ request.path|makebreadcrumbs:name_space|safe }}
{% endwith %}
In the code above makebreadcrumbs is my custom filter, request.path is a variable (value), and name_space is an argument.
I think what you want is a Django simple tag which can accept multiple arguments: