[ appengine ] writing the custom template in webapp2

The trick is using django template, not the webapp template.

from django.template.loader import render_to_string

...

render_to_string("template/body.html", {"param1", "val1"})

app.yaml

env_variables:
 DJANGO_SETTINGS_MODULE: 'settings'

settings.py

import os

PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
TEMPLATE_DIRS = (
PROJECT_PATH
)

main.py

from django.template import add_to_builtins
add_to_builtins('templatetags.whateverTag')

Leave a comment