App Engine Python SDK version 1.7.4 (2)
[gae.git] / python / lib / django_1_4 / django / contrib / gis / tests / geogapp / models.py
blob3696ba2ff4218310cabc2390ce220d33f4ddee3c
1 from django.contrib.gis.db import models
3 class City(models.Model):
4 name = models.CharField(max_length=30)
5 point = models.PointField(geography=True)
6 objects = models.GeoManager()
7 def __unicode__(self): return self.name
9 class Zipcode(models.Model):
10 code = models.CharField(max_length=10)
11 poly = models.PolygonField(geography=True)
12 objects = models.GeoManager()
13 def __unicode__(self): return self.code
15 class County(models.Model):
16 name = models.CharField(max_length=25)
17 state = models.CharField(max_length=20)
18 mpoly = models.MultiPolygonField(geography=True)
19 objects = models.GeoManager()
20 def __unicode__(self): return ' County, '.join([self.name, self.state])