added multipolygon field to geo modls
This commit is contained in:
@@ -6,6 +6,7 @@ class Country(models.Model):
|
||||
Country model
|
||||
"""
|
||||
name = models.CharField(max_length = 100)
|
||||
geo = models.MultiPolygonField(null=True)
|
||||
|
||||
# internal
|
||||
created = models.DateTimeField('date of creation', auto_now_add=True)
|
||||
@@ -45,6 +46,7 @@ class Province(models.Model):
|
||||
"""
|
||||
name = models.CharField(max_length = 100)
|
||||
region = models.ForeignKey(Region, on_delete=models.DO_NOTHING, related_name='province')
|
||||
geo = models.MultiPolygonField(null=True)
|
||||
|
||||
# internal
|
||||
created = models.DateTimeField('date of creation', auto_now_add=True)
|
||||
@@ -64,6 +66,7 @@ class City(models.Model):
|
||||
"""
|
||||
name = models.CharField(max_length = 250)
|
||||
province = models.ForeignKey(Province, on_delete=models.DO_NOTHING, related_name='city', null=True)
|
||||
geo = models.MultiPolygonField(null=True)
|
||||
|
||||
# internal
|
||||
created = models.DateTimeField('date of creation', auto_now_add=True)
|
||||
|
||||
Reference in New Issue
Block a user