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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user