do_trucate 在 jinja2 中,需要正确的用法

do_trucate in jinja2, correct usage needed

我想我看到了一些关于使用它来截断测试作为过滤器的东西,但我不知道如何使用它。使用 as xx|do_trucate(20) 给出以下结果:

TemplateAssertionError: no filter named 'do_truncate'

正确的用法是什么?

哦,根据我看到的规范

do_trucate

http://code.nabla.net/doc/jinja2/api/jinja2/jinja2.filters.html

但实际上,它只是 truncate