def geo_apps(namespace=True, runtests=False):
 from django.db import connection
 from django.contrib.gis.geos import GEOS_PREPARE
 from django.contrib.gis.gdal import HAS_GDAL
 apps = ['geoapp', 'relatedapp']
 if (not connection.ops.mysql):
  apps.append('distapp')
 if (connection.ops.postgis and connection.ops.geography):
  apps.append('geogapp')
 if HAS_GDAL:
  if (connection.ops.postgis and GEOS_PREPARE):
   apps.append('geo3d')
  apps.append('layermap')
 if runtests:
  return [('django.contrib.gis.tests', app) for app in apps]
 elif namespace:
  return [('django.contrib.gis.tests.%s' % app) for app in apps]
 else:
  return apps

def geo_apps ( namespace = True , runtests = False ) : from django . db import connection from django . contrib . gis . geos import GEOS_PREPARE from django . contrib . gis . gdal import HAS_GDAL apps = [ 'geoapp' , 'relatedapp' ] if ( not connection . ops . mysql ) : apps . append ( 'distapp' ) if ( connection . ops . postgis and connection . ops . geography ) : apps . append ( 'geogapp' ) if HAS_GDAL : if ( connection . ops . postgis and GEOS_PREPARE ) : apps . append ( 'geo3d' ) apps . append ( 'layermap' ) if runtests : return [ ( 'django.contrib.gis.tests' , app ) for app in apps ] elif namespace : return [ ( 'django.contrib.gis.tests.%s' % app ) for app in apps ] else : return apps
returns a list of geodjango test applications that reside in django .