fix: rework geocoding api usage, make api url custom

This commit is contained in:
2024-05-31 11:41:59 +02:00
parent 2a9dc337d2
commit 677fc6626b
4 changed files with 54 additions and 10 deletions

View File

@@ -64,10 +64,9 @@ class Species(models.Model):
class Location(models.Model):
def __str__(self):
return f"{self.name}"
return f"{self.name} ({self.latitude:.5}, {self.longitude:.5})"
place_id = models.IntegerField()
osm_id = models.IntegerField()
latitude = models.FloatField()
longitude = models.FloatField()
name = models.CharField(max_length=2000)