Lines Matching full:environment
81 def __init__(self, environment, template_name=None): argument
82 self.environment = environment
83 if callable(environment.autoescape):
84 self.autoescape = environment.autoescape(template_name)
86 self.autoescape = environment.autoescape
99 if node.environment is None:
102 'environment.')
103 return EvalContext(node.environment)
119 two attributes: `lineno` (the line number of the node) and `environment`.
120 The `environment` attribute is set at the end of the parsing process for
124 attributes = ('lineno', 'environment')
219 def set_environment(self, environment): argument
220 """Set the environment for all nodes."""
224 node.environment = environment
360 an attached environment.
381 if self.environment.sandboxed and \
382 self.operator in self.environment.intercepted_binops:
400 if self.environment.sandboxed and \
401 self.operator in self.environment.intercepted_unops:
442 def from_untrusted(cls, value, lineno=None, environment=None): argument
450 return cls(value, lineno=lineno, environment=environment)
558 filter_ = self.environment.filters.get(self.name)
566 args.insert(0, self.environment)
614 args.insert(0, self.environment)
642 return self.environment.getitem(self.node.as_const(eval_ctx),
662 return self.environment.getattr(self.node.as_const(eval_ctx),
800 """Loads an attribute from the environment object. This is useful for
801 extensions that want to call a callback stored on the environment.
807 """Returns the attribute of an extension bound to the environment.