Debugging Jinja2 templates in Google App Engine

Jinja2 needs some python modules that are forbidden in the python sandbox provided by Google App Engine. Fortunately its fairly easy to white list them in the SDK local development server — currently there is no workaround for production. PRODUCTION = not os.environ.get(’SERVER_SOFTWARE’, ”).startswith(’Dev’) if not PRODUCTION: # enable jinja2 …

GAE ancestor query without ancestor in the results

Ancestor queries in GAE can return the ancestor in the results: when ancestor and query kind are the same, eg.: SomeModel.query(ancestor=some_key) on kindless query, eg.: ndb.Query(ancestor=some_key) To filter out ancestor instance from being fetched use filter on __key__: SomeModel.query(ancestor=some_key).filter(SomeModel.key > some_key)

Back to Top