feat(#49): add geolocation (latitude/longitude) to municipalities

- Municipality model with optional latitude/longitude decimal fields
- Municipality and brief serializers expose lat/lng (also in product_provenance of public/authenticated summaries for the Leaflet map)
- seed_geography endpoint reads lat/lng and updates existing municipalities on reseed (idempotent)
- TDD tests for model, serializers, summaries and seed
This commit is contained in:
2026-08-16 04:10:45 -05:00
parent 699983931e
commit 3a0c76ce69
7 changed files with 140 additions and 3 deletions

View File

@@ -39,6 +39,12 @@ class Municipality(models.Model):
country = models.ForeignKey(
Country, on_delete=models.PROTECT, related_name="municipalities"
)
latitude = models.DecimalField(
max_digits=10, decimal_places=7, null=True, blank=True
)
longitude = models.DecimalField(
max_digits=10, decimal_places=7, null=True, blank=True
)
class Meta:
verbose_name = "Municipality"