I originally implemented Jinja2 on App Engine using the examples shown on the App Engine site here: https://developers.google.com/appengine/docs/python/gettingstartedpython27/te
TL;DR: Use option #2
If you don't use i18n, then it doesn't matter much. But in the real world people speak different languages than English, and there is a tricky issue with jinja2 i18n on GAE: Threading (i.e. threadsafe: true
in app.yaml) is on by default and important for performance, but most jinja2 i18n docs that you can find on the web are not thread safe. Since you don't want to explicitly pass down the locale to each jinja2 macro, it needs to be held in a thread-local variable. This is what webapp2_extras.jinja2
does correctly.