app/django/contrib/gis/tests/relatedapp/models.py
author Lennard de Rijk <ljvderijk@gmail.com>
Fri, 30 Jan 2009 11:30:43 +0000
changeset 1082 946adb594793
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Changed group_app logic to support scope_path. Moved link_id only as keyvalues to club_app. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed

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