app/django/contrib/gis/tests/relatedapp/models.py
author James Levy <jamesalexanderlevy@gmail.com
Mon, 06 Jul 2009 00:31:48 +0200
changeset 2554 e32452672666
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Added clear:right property to submit button in Survey take form. Reviewed by: Lennard de Rijk

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