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
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
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
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