笨鸟编程-零基础入门Pyhton教程

 找回密码
 立即注册

扩展

发布者: 笨鸟自学网



classjinja2.nodes.TemplateData(data)

A constant template string.

Node type:Literal
classjinja2.nodes.Tuple(itemsctx)

For loop unpacking and some other things like multiple arguments for subscripts. Like for Name ctx specifies if the tuple is used for loading the names or storing.

Node type:Literal
classjinja2.nodes.MarkSafe(expr)

Mark the wrapped expression as safe (wrap it as Markup).

Node type:Expr
classjinja2.nodes.MarkSafeIfAutoescape(expr)

Mark the wrapped expression as safe (wrap it as Markup) but only if autoescaping is active.

New in version 2.5.

Node type:Expr
classjinja2.nodes.Name(namectx)

Looks up a name or stores a value in a name. The ctx of the node can be one of the following values:

  • store: store a value in the name
  • load: load that name
  • param: like store but if the name was defined as function parameter.
Node type:Expr
classjinja2.nodes.Slice(startstopstep)

Represents a slice object. This must only be used as argument for Subscript.

Node type:Expr
classjinja2.nodes.Test(nodenameargskwargsdyn_argsdyn_kwargs)

Applies a test on an expression. name is the name of the test, the rest of the fields are the same as for Call.

Node type:Expr
classjinja2.nodes.UnaryExpr(node)

Baseclass for all unary expressions.

Node type:Expr
classjinja2.nodes.Neg(node)

Make the expression negative.

Node type:UnaryExpr
classjinja2.nodes.Not(node)

Negate the expression.

Node type:UnaryExpr
classjinja2.nodes.Pos(node)

Make the expression positive (noop for most expressions)

Node type:UnaryExpr
classjinja2.nodes.Helper

Nodes that exist in a specific context only.

Node type:Node
classjinja2.nodes.Keyword(keyvalue)

A key, value pair for keyword arguments where key is a string.

Node type:Helper
classjinja2.nodes.Operand(opexpr)

Holds an operator and an expression. The following operators are available: %***+-///eqgtgteqinltlteqnenot

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

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

GMT+8, 2024-12-22 12:58 , Processed in 0.024082 second(s), 17 queries .

© 2001-2020