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 - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -