django1/django/contrib/gis/tests/relatedapp/models.py

13 lines
362 B
Python

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()