author | Sverre Rabbelier <srabbelier@gmail.com> |
Sun, 04 Oct 2009 23:43:36 +0200 | |
changeset 3012 | 51eeb0c4317e |
parent 323 | ff1a9aa48cfd |
permissions | -rw-r--r-- |
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField 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 = USStateField() location = models.ForeignKey(Location) objects = models.GeoManager()