author | Sverre Rabbelier <srabbelier@gmail.com> |
Sat, 12 Sep 2009 01:04:58 +0200 | |
changeset 2900 | c9a723492dd5 |
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()