Expr Tag version: 0.2 author: limodou@gmail.com Updates 2006/12/03 If you don't add "as variable", then the result will directly output to template. Code from django import template from django.utils.translation import gettext_lazy as _ import re register = template.Library() class ExprNode(template.Node): def __init__(self, expr_string, var_name): self.expr_string = expr_string self.var_name = va