diff options
| author | Tim Graham <timograham@gmail.com> | 2015-08-10 08:03:08 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-08-10 10:29:36 -0400 |
| commit | b27547f9d1c3d3e0e0bd466cc841f966a42e67cd (patch) | |
| tree | c176c11b34866388f6884a4679b6ff1ef8b3972d /django | |
| parent | f2e4c7aca48374cd18f7e3bea333bbb5d73154cf (diff) | |
Removed deprecated GeoManager from inspectdb/ogrinspect output.
refs ea27e26b0907e74ab8d6c46a9694775a310fdc67
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/gis/management/commands/inspectdb.py | 15 | ||||
| -rw-r--r-- | django/contrib/gis/utils/ogrinspect.py | 1 |
2 files changed, 0 insertions, 16 deletions
diff --git a/django/contrib/gis/management/commands/inspectdb.py b/django/contrib/gis/management/commands/inspectdb.py index 229be74276..27345c59d4 100644 --- a/django/contrib/gis/management/commands/inspectdb.py +++ b/django/contrib/gis/management/commands/inspectdb.py @@ -4,7 +4,6 @@ from django.core.management.commands.inspectdb import \ class Command(InspectDBCommand): db_module = 'django.contrib.gis.db' - gis_tables = {} def get_field_type(self, connection, table_name, row): field_type, field_params, field_notes = super(Command, self).get_field_type(connection, table_name, row) @@ -14,18 +13,4 @@ class Command(InspectDBCommand): # from the `get_geometry_type` routine for the spatial backend. field_type, geo_params = connection.introspection.get_geometry_type(table_name, geo_col) field_params.update(geo_params) - # Adding the table name and column to the `gis_tables` dictionary, this - # allows us to track which tables need a GeoManager. - if table_name in self.gis_tables: - self.gis_tables[table_name].append(geo_col) - else: - self.gis_tables[table_name] = [geo_col] return field_type, field_params, field_notes - - def get_meta(self, table_name, constraints): - meta_lines = super(Command, self).get_meta(table_name, constraints) - if table_name in self.gis_tables: - # If the table is a geographic one, then we need make - # GeoManager the default manager for the model. - meta_lines.insert(0, ' objects = models.GeoManager()') - return meta_lines diff --git a/django/contrib/gis/utils/ogrinspect.py b/django/contrib/gis/utils/ogrinspect.py index dcc464e11f..3cf9b10fd5 100644 --- a/django/contrib/gis/utils/ogrinspect.py +++ b/django/contrib/gis/utils/ogrinspect.py @@ -232,7 +232,6 @@ def _ogrinspect(data_source, model_name, geom_name='geom', layer_key=0, srid=Non srid_str = 'srid=%s' % srid yield ' %s = models.%s(%s)' % (geom_name, geom_field, srid_str) - yield ' objects = models.GeoManager()' if name_field: yield '' |
