python - How do I integrate Chameleon with Flask? -


i know jinja2 default built-in template engine flask. question is:

is possible integreate chameleon flask ?

if so, how can ?

this how did. wrap response string in method..

from chameleon import pagetemplate  def execute_page(template_str, page):     # irrelevant     template = pagetemplate(template_str)     return template.render(page=page) 

then consume method , return httpresponse. hence, skip render_template(template_file_name) approach.

my question is: proper (pythonic, flask) way do?


Comments

Popular posts from this blog

javascript - How to update a get parameter in a url with jquery -

c - Run time Error with scanf -

amazon web services - How to determine the state of an AWS instance -