• Home
  • Raw
  • Download

Lines Matching full:environment

3     jinja2.environment
45 """Return a new spontaneous environment. A spontaneous environment is an
46 unnamed and unaccessible (in theory) environment that is used for
52 return Environment(*args)
55 _spontaneous_environments[args] = env = Environment(*args)
78 def load_extensions(environment, extensions): argument
79 """Load the extensions from the list and bind it to the environment.
86 result[extension.identifier] = extension(environment)
90 def _environment_sanity_check(environment): argument
91 """Perform a sanity check on the environment."""
92 assert issubclass(environment.undefined, Undefined), 'undefined must ' \
94 assert environment.block_start_string != \
95 environment.variable_start_string != \
96 environment.comment_start_string, 'block, variable and comment ' \
98 assert environment.newline_sequence in ('\r', '\r\n', '\n'), \
100 return environment
103 class Environment(object): class
104 r"""The core component of Jinja is the `Environment`. It contains
193 The template loader for this environment.
218 #: if this environment is sandboxed. Modifying this variable won't make
219 #: the environment sandboxed though. For a real sandboxed environment
224 #: True if the environment is just an overlay
227 #: the environment this environment is linked to if it is an overlay
230 #: shared environments have this set to `True`. A shared environment
308 """Adds an extension after the environment was created.
315 """Add the items to the instance of the environment if they do not exist
332 """Create a new overlay environment that shares all the data with the
333 current environment except of cache and the overridden attributes.
334 Extensions cannot be removed for an overlayed environment. An overlayed
335 environment automatically gets all the extensions of the environment it
338 Creating overlays should happen after the initial environment was set
340 copied over so modifications on the original environment may not shine
368 lexer = property(get_lexer, doc="The lexer for this environment.")
531 environment variable to be set.
566 >>> env = Environment()
696 """Returns a list of templates for this environment. This requires
759 raise TypeError('no loader for this environment specified')
854 Normally the template object is generated from an :class:`Environment` but
857 the environment constructor but it's not possible to specify a loader.
863 Template objects created from the constructor rather than an environment
864 do have an `environment` attribute that points to a temporary environment
909 def from_code(cls, environment, code, globals, uptodate=None): argument
911 is used by the loaders and environment to create a template object.
914 'environment': environment,
918 rv = cls._from_namespace(environment, namespace, globals)
923 def from_module_dict(cls, environment, module_dict, globals): argument
929 return cls._from_namespace(environment, module_dict, globals)
932 def _from_namespace(cls, environment, namespace, globals): argument
934 t.environment = environment
949 namespace['environment'] = environment
969 return self.environment.handle_exception(exc_info, True)
993 yield self.environment.handle_exception(exc_info, True)
1003 return new_context(self.environment, self.name, self.blocks,
1089 """The :meth:`jinja2.Environment.compile_expression` method returns an
1191 Environment.template_class = Template