1👍
✅
You’ve registered custom_foo()
as a filter, try registering it as a tag according to: https://docs.djangoproject.com/en/1.8/howto/custom-template-tags/ , for example:
from django import template
register = template.Library()
class BarNode(template.Node):
def render(self, context):
return 'bar'
@register.tag
def custom_foo(parser, token):
return BarNode()
Source:stackexchange.com