Skip to content

Commit

Permalink
Add geometry field to admin boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
norkans7 committed Jan 10, 2025
1 parent fa247ba commit 48c7b0a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions temba/locations/migrations/0033_adminboundary_geometry.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.4 on 2025-01-10 14:26

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("locations", "0032_squashed"),
]

operations = [
migrations.AddField(
model_name="adminboundary",
name="geometry",
field=models.JSONField(null=True),
),
]
1 change: 1 addition & 0 deletions temba/locations/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class AdminBoundary(MPTTModel, models.Model):
parent = TreeForeignKey("self", null=True, on_delete=models.PROTECT, related_name="children", db_index=True)
path = models.CharField(max_length=768) # e.g. Rwanda > Kigali
simplified_geometry = models.MultiPolygonField(null=True)
geometry = models.JSONField(null=True)

objects = NoGeometryManager()
geometries = GeometryManager()
Expand Down

0 comments on commit 48c7b0a

Please sign in to comment.