Lines Matching full:environment
56 """Return a new spontaneous environment. A spontaneous environment
58 existing environment.
60 :param cls: Environment class to create.
61 :param args: Positional arguments passed to environment.
91 def load_extensions(environment, extensions): argument
92 """Load the extensions from the list and bind it to the environment.
99 result[extension.identifier] = extension(environment)
114 def _environment_sanity_check(environment): argument
115 """Perform a sanity check on the environment."""
117 environment.undefined, Undefined
120 environment.block_start_string
121 != environment.variable_start_string
122 != environment.comment_start_string
124 assert environment.newline_sequence in {
129 return environment
132 class Environment: class
133 r"""The core component of Jinja is the `Environment`. It contains
222 The template loader for this environment.
254 #: if this environment is sandboxed. Modifying this variable won't make
255 #: the environment sandboxed though. For a real sandboxed environment
260 #: True if the environment is just an overlay
263 #: the environment this environment is linked to if it is an overlay
266 #: shared environments have this set to `True`. A shared environment
360 """Adds an extension after the environment was created.
367 """Add the items to the instance of the environment if they do not exist
397 """Create a new overlay environment that shares all the data with the
398 current environment except for cache and the overridden attributes.
399 Extensions cannot be removed for an overlayed environment. An overlayed
400 environment automatically gets all the extensions of the environment it
403 Creating overlays should happen after the initial environment was set
405 copied over so modifications on the original environment may not shine
433 lexer = property(get_lexer, doc="The lexer for this environment.")
475 environment in async mode and the filter supports async
608 environment variable to be set.
637 >>> env = Environment()
750 """Returns a list of templates for this environment. This requires
804 raise TypeError("no loader for this environment specified")
909 Normally the template object is generated from an :class:`Environment` but
912 the environment constructor but it's not possible to specify a loader.
918 Template objects created from the constructor rather than an environment
919 do have an `environment` attribute that points to a temporary environment
935 #: Type of environment to create when creating a template directly
936 #: rather than through an existing environment.
937 environment_class = Environment
989 def from_code(cls, environment, code, globals, uptodate=None): argument
991 is used by the loaders and environment to create a template object.
993 namespace = {"environment": environment, "__file__": code.co_filename}
995 rv = cls._from_namespace(environment, namespace, globals)
1000 def from_module_dict(cls, environment, module_dict, globals): argument
1006 return cls._from_namespace(environment, module_dict, globals)
1009 def _from_namespace(cls, environment, namespace, globals): argument
1011 t.environment = environment
1026 namespace["environment"] = environment
1045 self.environment.handle_exception()
1079 yield self.environment.handle_exception()
1099 self.environment, self.name, self.blocks, vars, shared, self.globals, locals
1201 if context.environment.is_async:
1228 """The :meth:`jinja2.Environment.compile_expression` method returns an
1331 Environment.template_class = Template