app/django/contrib/gis/tests/relatedapp/models.py
author Pawel Solyga <Pawel.Solyga@gmail.com>
Mon, 18 May 2009 19:33:47 +0200
changeset 2325 a72a1490a876
parent 323 ff1a9aa48cfd
permissions -rw-r--r--
Add missing __init__.py file to htmlsanitizer folder.

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