@register.function
@jinja2.contextfunction
def csrf(context):
    return jinja2.Markup(CsrfTokenNode().render(context))
Equivalent of Django's ``{% crsf_token %}``.
dataset/ETHPy150Open jbalogh/jingo/jingo/helpers.py/csrf