summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py
diff options
context:
space:
mode:
authorcoderick142017-05-17 15:40:18 +0530
committercoderick142017-05-17 15:41:00 +0530
commita1e0a5502f04da68b6a9ca8508dda3f9d7e1d055 (patch)
tree20181e6b1936f50ad48d8e35720d64a37566f558 /lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py
parent6f4a84c1e58ff4d54aab94cbee26e995328b05b8 (diff)
downloadSBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.gz
SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.bz2
SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.zip
Upgrade to Django 1.11
- Database integration yet to be tested
Diffstat (limited to 'lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py')
-rw-r--r--lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py b/lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py
deleted file mode 100644
index fa83859..0000000
--- a/lib/python2.7/site-packages/django/contrib/gis/tests/geoapp/models.py
+++ /dev/null
@@ -1,56 +0,0 @@
-from django.contrib.gis.db import models
-from django.contrib.gis.tests.utils import mysql, spatialite
-from django.utils.encoding import python_2_unicode_compatible
-
-# MySQL spatial indices can't handle NULL geometries.
-null_flag = not mysql
-
-@python_2_unicode_compatible
-class Country(models.Model):
- name = models.CharField(max_length=30)
- mpoly = models.MultiPolygonField() # SRID, by default, is 4326
- objects = models.GeoManager()
- def __str__(self): return self.name
-
-@python_2_unicode_compatible
-class City(models.Model):
- name = models.CharField(max_length=30)
- point = models.PointField()
- objects = models.GeoManager()
- def __str__(self): return self.name
-
-# This is an inherited model from City
-class PennsylvaniaCity(City):
- county = models.CharField(max_length=30)
- founded = models.DateTimeField(null=True)
- objects = models.GeoManager() # TODO: This should be implicitly inherited.
-
-@python_2_unicode_compatible
-class State(models.Model):
- name = models.CharField(max_length=30)
- poly = models.PolygonField(null=null_flag) # Allowing NULL geometries here.
- objects = models.GeoManager()
- def __str__(self): return self.name
-
-@python_2_unicode_compatible
-class Track(models.Model):
- name = models.CharField(max_length=30)
- line = models.LineStringField()
- objects = models.GeoManager()
- def __str__(self): return self.name
-
-class Truth(models.Model):
- val = models.BooleanField(default=False)
- objects = models.GeoManager()
-
-if not spatialite:
- @python_2_unicode_compatible
- class Feature(models.Model):
- name = models.CharField(max_length=20)
- geom = models.GeometryField()
- objects = models.GeoManager()
- def __str__(self): return self.name
-
- class MinusOneSRID(models.Model):
- geom = models.PointField(srid=-1) # Minus one SRID.
- objects = models.GeoManager()