def _django_setup():
  if os.environ.get('APPENGINE_RUNTIME') != 'python27':
    __django_version_setup()


  import django


  import django.conf
  try:

    raise ImportError
    # TODO: Right now the below line raises a
    # django.core.exceptions.ImproperlyConfigured exception. Need to investigate
    # why and address accordingly.
    #getattr(django.conf.settings, 'FAKE_ATTR', None)
  except (ImportError, EnvironmentError), e:



    if os.getenv(django.conf.ENVIRONMENT_VARIABLE):


      logging.warning(e)

    try:
      django.conf.settings.configure(
        DEBUG=False,
        TEMPLATE_DEBUG=False,
        TEMPLATE_LOADERS=(
          'django.template.loaders.filesystem.load_template_source',
        ),
      )
    except (EnvironmentError, RuntimeError):



      pass
Imports and configures Django.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/webapp/__init__.py/_django_setup