You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
417 B
13 lines
417 B
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()
|
|
|