def render_html(self, html, params=None): if params: self.view.update(params) if LOCAL: html = cache_buster(html) self.response.out.write(html) self.emited = True
def render_html(self, html, params = None): if params: self.view.update(params) if LOCAL: html = cache_buster(html) self.response.out.write(html) self.emited = True
def render(self, template_name): env = jinja2.Environment(loader = InternalTemplateLoader(os.path.join(DRY_ROOT, 'app', 'views'))) try: template = env.get_template(template_name) except jinja2.TemplateNotFound: raise jinja2.TemplateNotFound(template_name) content = template.render(self.view) if LOCAL: content = cache_buster(content) self.response.out.write(content)
def render(self, template_name): env = jinja2.Environment(loader=InternalTemplateLoader( os.path.join(DRY_ROOT, 'app', 'views'))) try: template = env.get_template(template_name) except jinja2.TemplateNotFound: raise jinja2.TemplateNotFound(template_name) content = template.render(self.view) if LOCAL: content = cache_buster(content) self.response.out.write(content)
def render_text(self, text): self.response.headers['Content-Type'] = 'text/html' if LOCAL: text = cache_buster(text) self.response.out.write(text) self.emited = True