blob: 8484054e0da73d026355ad222ef11096f95f5745 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
from django.contrib.gis.db import models
class Location(models.Model):
name = models.CharField(max_length=50)
point = models.PointField()
objects = models.GeoManager()
class City(models.Model):
name = models.CharField(max_length=50)
state = models.USStateField()
location = models.ForeignKey(Location)
objects = models.GeoManager()
|