How can I make a tag that behaves like either simple_tag or assignment_tag, that both {% mytag %} and {% mytag as varname %} are possible? With the following code, I can’t use the tag like {% mytag %}.
@register.assignment_tag
def mytag():
return 'hello, world!'
You can use a Node, for example like this:
inbox.py