Lines Matching refs:globals
116 globals and others. Instances of this class may be modified if
321 self.globals = DEFAULT_NAMESPACE.copy()
795 def _load_template(self, name, globals):
804 template = self.loader.load(self, name, globals)
810 def get_template(self, name, parent=None, globals=None):
816 The `globals` parameter can be used to provide template wide globals.
830 return self._load_template(name, self.make_globals(globals))
833 def select_template(self, names, parent=None, globals=None):
847 globals = self.make_globals(globals)
854 return self._load_template(name, globals)
861 parent=None, globals=None):
869 return self.get_template(template_name_or_list, parent, globals)
872 return self.select_template(template_name_or_list, parent, globals)
874 def from_string(self, source, globals=None, template_class=None):
878 globals = self.make_globals(globals)
880 return cls.from_code(self, self.compile(source), globals, None)
883 """Return a dict for the globals."""
885 return self.globals
886 return dict(self.globals, **d)
948 def from_code(cls, environment, code, globals, uptodate=None):
949 """Creates a template object from compiled code and the globals. This
957 rv = cls._from_namespace(environment, namespace, globals)
962 def from_module_dict(cls, environment, module_dict, globals):
968 return cls._from_namespace(environment, module_dict, globals)
971 def _from_namespace(cls, environment, namespace, globals):
974 t.globals = globals
1057 provided will be passed to the template. Per default the globals
1059 is passed as it to the context without adding the globals.
1064 vars, shared, self.globals, locals)