Exemple #1
0
 def _init_filters(self):
     Template._init_filters(self)
     # Make sure the include filter comes after the match filter
     if self.loader:
         self.filters.remove(self._include)
     self.filters += [self._match]
     if self.loader:
         self.filters.append(self._include)
Exemple #2
0
 def __init__(
     self,
     source,
     filepath=None,
     filename=None,
     loader=None,
     encoding=None,
     lookup="strict",
     allow_exec=False,
     delims=("{%", "%}", "{#", "#}"),
 ):
     self.delimiters = delims
     Template.__init__(
         self, source, filepath=filepath, filename=filename, loader=loader, encoding=encoding, lookup=lookup
     )
Exemple #3
0
 def __init__(self,
              source,
              filepath=None,
              filename=None,
              loader=None,
              encoding=None,
              lookup='strict',
              allow_exec=True):
     Template.__init__(self,
                       source,
                       filepath=filepath,
                       filename=filename,
                       loader=loader,
                       encoding=encoding,
                       lookup=lookup,
                       allow_exec=allow_exec)
     self.add_directives(self.DIRECTIVE_NAMESPACE, self)
Exemple #4
0
 def __init__(self,
              source,
              filepath=None,
              filename=None,
              loader=None,
              encoding=None,
              lookup='strict',
              allow_exec=False,
              delims=('{%', '%}', '{#', '#}')):
     self.delimiters = delims
     Template.__init__(self,
                       source,
                       filepath=filepath,
                       filename=filename,
                       loader=loader,
                       encoding=encoding,
                       lookup=lookup)
Exemple #5
0
 def _init_filters(self):
     Template._init_filters(self)
     # Make sure the include filter comes after the match filter
     self.filters.remove(self._include)
     self.filters += [self._match, self._include]
Exemple #6
0
 def _prepare(self, stream):
     return Template._prepare(
         self, self._extract_includes(self._interpolate_attrs(stream)))
Exemple #7
0
 def _prepare(self, stream, inlined=None):
     return Template._prepare(self,
                              self._extract_includes(
                                  self._interpolate_attrs(stream)),
                              inlined=inlined)
Exemple #8
0
 def __init__(self, source, filepath=None, filename=None, loader=None,
              encoding=None, lookup='strict', allow_exec=True):
     Template.__init__(self, source, filepath=filepath, filename=filename,
                       loader=loader, encoding=encoding, lookup=lookup,
                       allow_exec=allow_exec)
     self.add_directives(self.DIRECTIVE_NAMESPACE, self)
Exemple #9
0
 def _prepare(self, stream):
     return Template._prepare(self,
         self._extract_includes(self._interpolate_attrs(stream))
     )
 def _init_filters(self):
     Template._init_filters(self)
     # Make sure the include filter comes after the match filter
     self.filters.remove(self._include)
     self.filters += [self._match, self._include]
Exemple #11
0
 def __init__(self, source, filepath=None, filename=None, loader=None,
              encoding=None, lookup='strict', allow_exec=False,
              delims=('{%', '%}', '{#', '#}')):
     self.delimiters = delims
     Template.__init__(self, source, filepath=filepath, filename=filename,
                       loader=loader, encoding=encoding, lookup=lookup)
Exemple #12
0
 def _prepare(self, stream, inlined=None):
     return Template._prepare(
         self, self._extract_includes(self._interpolate_attrs(stream)),
         inlined=inlined)