@register.tag
def assign(parser, token):
    bits = token.contents.split()
    if len(bits) != 3:
        raise template.TemplateSyntaxError("'%s' tag takes two arguments" % bits[0])
    value = parser.compile_filter(bits[2])
    return AssignNode(bits[1], value)
Assign an expression to a variable in the current context.
dataset/ETHPy150Open pfibiger/grumblechat/tags/filters.py/assign