def _prepareHDF(self): try: hdf = clearsilver.hdfFromKwargs(hdf=self.hdf, **self.kwargs) except Exception, e: self._deferred.errback(e)
def render_blocking(self, hdf=None, **kwargs): hdf = clearsilver.hdfFromKwargs(hdf=hdf, **kwargs) cs = clearsilver.CS(hdf) cs.parseFile(self.template.template_path) result = cs.render() return result
def test_render_blocking_hdf(self): template = self.loader.load("test.cst") hdf = clearsilver.hdfFromKwargs(**self.c) xhtml = template.render_blocking(hdf=hdf) self.assertTrue(xhtml.find("foo") !=-1)
def test_render_blocking_hdf(self): template = self.loader.load("test.cst") hdf = clearsilver.hdfFromKwargs(**self.c) xhtml = template.render_blocking(hdf=hdf) self.assertTrue(xhtml.find("foo") != -1)