[Answer]-Retrieving an object into django templatetags.

1👍

Don’t use the tag decorator, which needs a separate Node class in order to resolve variables. Instead, use the simple_tag decorator, which is passed the parameters directly.

@register.simple_tag
def myTag(item):
    ...

Leave a comment