Loading django/contrib/gis/db/backends/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ class BaseSpatialFeatures(object): # Does the backend support the django.contrib.gis.utils.add_srs_entry() utility? supports_add_srs_entry = True # Does the backend introspect GeometryField to its subtypes? supports_geometry_field_introspection = True # Reference implementation of 3D functions is: # http://postgis.net/docs/PostGIS_Special_Functions_Index.html#PostGIS_3D_Functions Loading django/contrib/gis/db/backends/oracle/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ from django.contrib.gis.db.backends.oracle.operations import OracleOperations class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): supports_add_srs_entry = False supports_geometry_field_introspection = False class DatabaseWrapper(OracleDatabaseWrapper): Loading django/contrib/gis/tests/inspectapp/tests.py +7 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import re from unittest import skipUnless from django.core.management import call_command from django.db import connections from django.db import connection, connections from django.test import TestCase, skipUnlessDBFeature from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geometry.test_data import TEST_DATA Loading @@ -30,8 +30,12 @@ class InspectDbTests(TestCase): table_name_filter=lambda tn: tn.startswith('inspectapp_'), stdout=out) output = out.getvalue() if connection.features.supports_geometry_field_introspection: self.assertIn('geom = models.PolygonField()', output) self.assertIn('point = models.PointField()', output) else: self.assertIn('geom = models.GeometryField(', output) self.assertIn('point = models.GeometryField(', output) self.assertIn('objects = models.GeoManager()', output) Loading Loading
django/contrib/gis/db/backends/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ class BaseSpatialFeatures(object): # Does the backend support the django.contrib.gis.utils.add_srs_entry() utility? supports_add_srs_entry = True # Does the backend introspect GeometryField to its subtypes? supports_geometry_field_introspection = True # Reference implementation of 3D functions is: # http://postgis.net/docs/PostGIS_Special_Functions_Index.html#PostGIS_3D_Functions Loading
django/contrib/gis/db/backends/oracle/base.py +1 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ from django.contrib.gis.db.backends.oracle.operations import OracleOperations class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures): supports_add_srs_entry = False supports_geometry_field_introspection = False class DatabaseWrapper(OracleDatabaseWrapper): Loading
django/contrib/gis/tests/inspectapp/tests.py +7 −3 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ import re from unittest import skipUnless from django.core.management import call_command from django.db import connections from django.db import connection, connections from django.test import TestCase, skipUnlessDBFeature from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geometry.test_data import TEST_DATA Loading @@ -30,8 +30,12 @@ class InspectDbTests(TestCase): table_name_filter=lambda tn: tn.startswith('inspectapp_'), stdout=out) output = out.getvalue() if connection.features.supports_geometry_field_introspection: self.assertIn('geom = models.PolygonField()', output) self.assertIn('point = models.PointField()', output) else: self.assertIn('geom = models.GeometryField(', output) self.assertIn('point = models.GeometryField(', output) self.assertIn('objects = models.GeoManager()', output) Loading