app/django/contrib/gis/tests/relatedapp/models.py
changeset 323 ff1a9aa48cfd
equal deleted inserted replaced
322:6641e941ef1e 323:ff1a9aa48cfd
       
     1 from django.contrib.gis.db import models
       
     2 from django.contrib.localflavor.us.models import USStateField
       
     3 
       
     4 class Location(models.Model):
       
     5     name = models.CharField(max_length=50)
       
     6     point = models.PointField()
       
     7     objects = models.GeoManager()
       
     8 
       
     9 class City(models.Model):
       
    10     name = models.CharField(max_length=50)
       
    11     state = USStateField()
       
    12     location = models.ForeignKey(Location)
       
    13     objects = models.GeoManager()