Module ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias If NameLoad body ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Assign NameStore Num FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign NameStore Call NameLoad NameLoad Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Assign NameStore Call NameLoad NameLoad Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Str attr attr body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad Str keyword AttributeLoad AttributeLoad NameLoad attr attr keyword ListLoad Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list decorator_list Call NameLoad BoolOpAnd NameLoad NameLoad Str FunctionDef arguments args defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Dict Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler body Return NameLoad If CompareEq SubscriptLoad NameLoad Index Str Str body Return NameLoad Assign NameStore ListLoad BinOpMod NameLoad Dict Str SubscriptLoad NameLoad Index Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad NameLoad decorator_list Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Expr Call NameLoad Str Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A __future__ absolute_import N/A os django.db connections django.test TestCase django.contrib.gis.gdal HAS_GDAL django.contrib.gis.geometry.test_data TEST_DATA django.contrib.gis.tests.utils HAS_SPATIAL_DB django.utils.unittest skipUnless N/A HAS_GDAL N/A django.contrib.gis.gdal Driver django.contrib.gis.utils.ogrinspect ogrinspect models AllOGRFields OGRInspectTest N/A TestCase N/A N/A maxDiff 1024 test_poly N/A N/A self N/A N/A N/A shp_file N/A N/A N/A os path join TEST_DATA test_poly test_poly.shp N/A model_def N/A ogrinspect shp_file MyModel N/A expected N/A # This is an auto-generated Django model module created by ogrinspect. from django.contrib.gis.db import models class MyModel(models.Model):     float = models.FloatField()     int = models.FloatField()     str = models.CharField(max_length=80)     geom = models.PolygonField(srid=-1)     objects = models.GeoManager() N/A N/A N/A self assertEqual model_def N/A N/A join expected N/A test_date_field N/A N/A self N/A N/A N/A shp_file N/A N/A N/A os path join TEST_DATA cities cities.shp N/A model_def N/A ogrinspect shp_file City N/A expected N/A # This is an auto-generated Django model module created by ogrinspect. from django.contrib.gis.db import models class City(models.Model):     name = models.CharField(max_length=80)     population = models.FloatField()     density = models.FloatField()     created = models.DateField()     geom = models.PointField(srid=-1)     objects = models.GeoManager() N/A N/A N/A self assertEqual model_def N/A N/A join expected N/A test_time_field N/A N/A self N/A N/A N/A N/A N/A N/A N/A connections N/A default ops postgis N/A N/A N/A N/A self skipTest This database does not support 'ogrinspect'ion N/A ogr_db N/A get_ogr_db_string N/A N/A ogr_db N/A N/A N/A N/A self skipTest Your GDAL installation does not support PostGIS databases N/A model_def N/A ogrinspect ogr_db Measurement layer_key N/A N/A AllOGRFields _meta db_table decimal N/A f_decimal N/A N/A N/A self assertTrue N/A N/A model_def startswith # This is an auto-generated Django model module created by ogrinspect.
from django.contrib.gis.db import models

class Measurement(models.Model):
 N/A N/A N/A self assertIn     f_decimal = models.DecimalField(max_digits=0, decimal_places=0) model_def N/A N/A N/A self assertIn     f_int = models.IntegerField() model_def N/A N/A N/A self assertIn     f_datetime = models.DateTimeField() model_def N/A N/A N/A self assertIn     f_time = models.TimeField() model_def N/A N/A N/A self assertIn     f_float = models.FloatField() model_def N/A N/A N/A self assertIn     f_char = models.CharField(max_length=10) model_def N/A N/A N/A self assertIn     f_date = models.DateField() model_def N/A N/A N/A self assertTrue N/A N/A model_def endswith     geom = models.PolygonField()
    objects = models.GeoManager() N/A N/A N/A skipUnless N/A HAS_GDAL HAS_SPATIAL_DB GDAL and spatial db are required. get_ogr_db_string N/A N/A N/A N/A N/A 
    Construct the DB string that GDAL will use to inspect the database.
    GDAL will create its own connection to the database, so we re-use the
    connection settings from the Django test.
     N/A db N/A N/A connections databases N/A default N/A drivers N/A django.contrib.gis.db.backends.postgis django.contrib.gis.db.backends.mysql django.contrib.gis.db.backends.spatialite N/A PostgreSQL PG:dbname='%(db_name)s' N/A MySQL MYSQL:"%(db_name)s" , N/A SQLite %(db_name)s N/A N/A drv_name db_str param_sep N/A drivers N/A N/A db N/A ENGINE N/A N/A N/A N/A Driver drv_name N/A N/A N/A N/A None N/A N/A N/A db N/A NAME :memory: N/A N/A None N/A params N/A N/A db_str N/A db_name N/A db N/A NAME add N/A N/A key template N/A N/A N/A value N/A N/A db get key None N/A value N/A N/A N/A N/A params append N/A template value N/A N/A N/A add HOST host='%s' N/A N/A add PORT port='%s' N/A N/A add USER user='%s' N/A N/A add PASSWORD password='%s' N/A N/A N/A param_sep join params N/A