app/django/contrib/gis/tests/relatedapp/models.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sun, 12 Apr 2009 12:31:55 +0000
changeset 2170 cec46675f866
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Send out notifications and emails to admin and backup admin Patch by: Sverre Rabbelier

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