librelist archives

« back to archive

render_template outside of blueprint

render_template outside of blueprint

From:
Peter
Date:
2013-04-09 @ 13:40
Hello,

I would like to use render_template and all corresponding jinja filters 
outsite a blueprint / route-function.

A minimal example would be:
def render_me():
    return render_template("path/to/site.html")

The exception flask throws is the following:
ctx.app.update_template_context(context)
     AttributeError: 'NoneType' object has no attribute 'app'

I understand that the context is missing, but is there a workaround or 
just something I'm missing?

Thanks for your help in advance. :-)
Peter