-
Notifications
You must be signed in to change notification settings - Fork 308
port to Jinja2 #1783
Comments
Looks like they haven't even addressed (1) yet. |
👍 |
It seems like Jinja2's goal is to keep python out of templates. Which is does by rendering the templates in a new context, so we don't have any python functions out of the box, we have to "approve" specific ones we want. I've made a semi complete comparison of a couple of templating engines I found for python. |
So far Mako looks pretty good but the syntax is different, Django also looks good. |
It doesn't look like Django's Templating Engine is modular though, so we wouldn't be able to easily pull it out for use with Aspen. Mako is it's own thing that can easily be included in our project. |
I'm pretty sure we don't want embedded Python syntax. What's wrong with whitelisting template-global functions? |
Global functions includes native Python functions. That's not a limitation of tornado. And our template loops and calls look like python, but the Jinja the syntax is different. On my phone so I will clarify later. |
Cool, we talked about it in IRC and decided on Jinja2 |
Anything missing here? I don't think so. |
Advantages over Tornado 1.x:
Granted, Tornado 1.x is ancient. However, 3.x may address (1) but afaict they don't address (2) nor (3).
The text was updated successfully, but these errors were encountered: