Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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
Exemplo n.º 6
0
 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