class Address models Model address1 models CharField max_length 100 ad

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
class Address(models.Model):
address1 = models.CharField(max_length=100)
address2 = models.CharField(max_length=100)
city = models.CharField(max_length=32)
state = models.StateField()
zip = models.CharField(max_length=11)
class School(models.Model):
name = models.CharField(max_length=32)
description = models.TextField()
address = models.ForeignKey(Address)
class Restaurant(models.Model):
name = models.CharField(max_length=32)
address = models.ForeignKey(Address)