找回密码
 立即注册

扩展

2022-2-22 23:50| 发布者: 笨鸟自学网| 查看: 7572| 评论: 0

摘要: Jinja2 支持扩展来添加过滤器、测试、全局变量或者甚至是处理器。扩展的主要动力是 把诸如添加国际化支持的常用代码迁移到一个可重用的类。添加扩展扩展在 Jinja2 环境创建时被添加。一旦环境被创建,就不能添加额外 ...


classjinja2.nodes.Output(nodes)

A node that holds multiple expressions which are then printed out. This is used both for the print statement and the regular template data.

Node type:Stmt
classjinja2.nodes.Scope(body)

An artificial scope.

Node type:Stmt
classjinja2.nodes.Template(body)

Node that represents a template. This must be the outermost node that is passed to the compiler.

Node type:Node
exceptionjinja2.nodes.Impossible

Raised if the node could not perform a requested action.

12345678
上一篇:模板设计者文档下一篇:集成

Archiver|手机版|笨鸟自学网 ( 粤ICP备20019910号 )

GMT+8, 2025-8-31 01:06 , Processed in 0.016366 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2017 Discuz Team. Template By 【未来科技】【 www.wekei.cn 】

返回顶部