Lines Matching full:globals
106 globals and others. Instances of this class may be modified if
294 self.globals = DEFAULT_NAMESPACE.copy()
757 def _load_template(self, name, globals):
765 template = self.loader.load(self, name, globals)
771 def get_template(self, name, parent=None, globals=None):
777 The `globals` parameter can be used to provide template wide globals.
791 return self._load_template(name, self.make_globals(globals))
794 def select_template(self, names, parent=None, globals=None):
808 globals = self.make_globals(globals)
815 return self._load_template(name, globals)
822 parent=None, globals=None):
830 return self.get_template(template_name_or_list, parent, globals)
833 return self.select_template(template_name_or_list, parent, globals)
835 def from_string(self, source, globals=None, template_class=None):
839 globals = self.make_globals(globals)
841 return cls.from_code(self, self.compile(source), globals, None)
844 """Return a dict for the globals."""
846 return self.globals
847 return dict(self.globals, **d)
909 def from_code(cls, environment, code, globals, uptodate=None):
910 """Creates a template object from compiled code and the globals. This
918 rv = cls._from_namespace(environment, namespace, globals)
923 def from_module_dict(cls, environment, module_dict, globals):
929 return cls._from_namespace(environment, module_dict, globals)
932 def _from_namespace(cls, environment, namespace, globals):
935 t.globals = globals
997 provided will be passed to the template. Per default the globals
999 is passed as it to the context without adding the globals.
1004 vars, shared, self.globals, locals)