def DjangoVersion():
  """Discover the version of Django installed.

  Returns:
    A distutils.version.LooseVersion.
  """
  try:

    __import__('django.' + _DESIRED_DJANGO_VERSION)
  except __HOLE__:
    pass
  import django
  try:
    return distutils.version.LooseVersion('.'.join(map(str, django.VERSION)))
  except AttributeError:

    return LooseVersion(django.VERSION)
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/dist/_library.py/DjangoVersion