def render(tmplname, data):
  here = os.path.dirname(__file__)
  tmpl = os.path.join(here, 'templates', tmplname)
  data['env'] = os.environ
  data['shell_ok'] = recording.config.SHELL_OK
  data['multithread'] = os.getenv('wsgi.multithread')
  try:
    return _template.render(tmpl, data)
  except Exception, err:
    logging.exception('Failed to render %s', tmpl)
    return 'Problematic template %s: %s' % (tmplname, err)
Helper function to render a template.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/appstats/ui.py/render