def _load_internal_django(path, debug):
 import google.appengine._internal.django.conf
 import google.appengine._internal.django.template.loader
 from google.appengine._internal import django
 abspath = os.path.abspath(path)
 if (not debug):
  template = template_cache.get(abspath, None)
 else:
  template = None
 if (not template):
  (directory, file_name) = os.path.split(abspath)
  settings = dict(TEMPLATE_LOADERS=('google.appengine._internal.django.template.loaders.filesystem.load_template_source',), TEMPLATE_DIRS=(directory,), TEMPLATE_DEBUG=debug, DEBUG=debug)
  django.conf.settings.configure(**settings)
  template = django.template.loader.get_template(file_name)
  if (not debug):
   template_cache[abspath] = template
  def wrap_render(context, orig_render=template.render):
   django.conf.settings.configure(**settings)
   return orig_render(context)
  template.render = wrap_render
 return template

def _load_internal_django ( path , debug ) : import google . appengine . _internal . django . conf import google . appengine . _internal . django . template . loader from google . appengine . _internal import django abspath = os . path . abspath ( path ) if ( not debug ) : template = template_cache . get ( abspath , None ) else : template = None if ( not template ) : ( directory , file_name ) = os . path . split ( abspath ) settings = dict ( TEMPLATE_LOADERS = ( 'google.appengine._internal.django.template.loaders.filesystem.load_template_source' , ) , TEMPLATE_DIRS = ( directory , ) , TEMPLATE_DEBUG = debug , DEBUG = debug ) django . conf . settings . configure ( ** settings ) template = django . template . loader . get_template ( file_name ) if ( not debug ) : template_cache [ abspath ] = template def wrap_render ( context , orig_render = template . render ) : django . conf . settings . configure ( ** settings ) return orig_render ( context ) template . render = wrap_render return template
load the given template using the django found in apphosting .