author | Sverre Rabbelier <srabbelier@gmail.com> |
Tue, 24 Feb 2009 18:58:57 +0000 | |
changeset 1481 | 0ccf92d073e8 |
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()