app/django/contrib/gis/tests/relatedapp/models.py
author Sverre Rabbelier <srabbelier@gmail.com>
Sun, 16 Nov 2008 15:51:19 +0000
changeset 489 35fbec27f6cb
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Fixed typo in soc.views.models.host redirects

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