Ejemplo n.º 1
0
 def template(self):
     tf = PageTemplateFile(
         self.path, auto_reload=self.lookup.auto_reload, debug=self.lookup.debug, translate=self.lookup.translate
     )
     if self.macro:
         # render only the portion of the template included in a
         # define-macro named the value of self.macro
         macro_renderer = tf.macros[self.macro].include
         tf._render = macro_renderer
     return tf
Ejemplo n.º 2
0
 def template(self):
     tf = PageTemplateFile(self.path,
                           auto_reload=self.lookup.auto_reload,
                           debug=self.lookup.debug,
                           translate=self.lookup.translate)
     if self.macro:
         # render only the portion of the template included in a
         # define-macro named the value of self.macro
         macro_renderer = tf.macros[self.macro].include
         tf._render = macro_renderer
     return tf
Ejemplo n.º 3
0
 def template(self):
     if sys.platform.startswith("java"):  # pragma: no cover
         raise RuntimeError("Chameleon templates are not compatible with Jython")
     tf = PageTemplateFile(
         self.path, auto_reload=self.lookup.auto_reload, debug=self.lookup.debug, translate=self.lookup.translate
     )
     if self.macro:
         # render only the portion of the template included in a
         # define-macro named the value of self.macro
         macro_renderer = tf.macros[self.macro].include
         tf._render = macro_renderer
     return tf
Ejemplo n.º 4
0
 def template(self):
     if sys.platform.startswith('java'):  # pragma: no cover
         raise RuntimeError(
             'Chameleon templates are not compatible with Jython')
     tf = PageTemplateFile(self.path,
                           auto_reload=self.lookup.auto_reload,
                           debug=self.lookup.debug,
                           translate=self.lookup.translate)
     if self.macro:
         # render only the portion of the template included in a
         # define-macro named the value of self.macro
         macro_renderer = tf.macros[self.macro].include
         tf._render = macro_renderer
     return tf