summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/south/introspection_plugins/geodjango.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/south/introspection_plugins/geodjango.py')
-rw-r--r--lib/python2.7/site-packages/south/introspection_plugins/geodjango.py45
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/python2.7/site-packages/south/introspection_plugins/geodjango.py b/lib/python2.7/site-packages/south/introspection_plugins/geodjango.py
deleted file mode 100644
index bece1c9..0000000
--- a/lib/python2.7/site-packages/south/introspection_plugins/geodjango.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-GeoDjango introspection rules
-"""
-
-import django
-from django.conf import settings
-
-from south.modelsinspector import add_introspection_rules
-
-has_gis = "django.contrib.gis" in settings.INSTALLED_APPS
-
-if has_gis:
- # Alright,import the field
- from django.contrib.gis.db.models.fields import GeometryField
-
- # Make some introspection rules
- if django.VERSION[0] == 1 and django.VERSION[1] >= 1:
- # Django 1.1's gis module renamed these.
- rules = [
- (
- (GeometryField, ),
- [],
- {
- "srid": ["srid", {"default": 4326}],
- "spatial_index": ["spatial_index", {"default": True}],
- "dim": ["dim", {"default": 2}],
- "geography": ["geography", {"default": False}],
- },
- ),
- ]
- else:
- rules = [
- (
- (GeometryField, ),
- [],
- {
- "srid": ["_srid", {"default": 4326}],
- "spatial_index": ["_index", {"default": True}],
- "dim": ["_dim", {"default": 2}],
- },
- ),
- ]
-
- # Install them
- add_introspection_rules(rules, ["^django\.contrib\.gis"]) \ No newline at end of file