Catching exceptions with futures in Tornado?

2016-01-30 Thread David Rueter
I am using Jinja2 (2.8) under Python (3.4) with Tornado (4.3), and things work well--except I am having trouble catching exceptions that Jinja2 raises. For example, I will do something like this: try: buf = template.render(data=this_data)

A way to use include with .from_string() instead of file?

2016-04-14 Thread David Rueter
I am using the Jinja environment .from_string() method to create my templates from a strings stored in a database. This is working well, but I would like to be able to include templates--such as perhaps a common template for the header, a common template for the footer, etc. The Jinja Include