import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext import db
for k in [k for k in sys.modules if k.startswith('django')]:
    del sys.modules[k]
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from django.template.loader import render_to_string
from django.conf import settings
TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates')
settings.configure(TEMPLATE_DIRS=(TEMPLATE_DIR, ''))
Как использовать шаблоны Django 1.2 в моем проекте Google App Engine?