1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 07:19:36 +02:00

feat: update toast messages and add city updates; enhance geocoding checks and localizations

This commit is contained in:
Sean Morley 2025-01-15 11:53:04 -05:00
parent bcbe7657ad
commit 0588555707
13 changed files with 89 additions and 37 deletions

View file

@ -1235,6 +1235,8 @@ class ReverseGeocodeViewSet(viewsets.ViewSet):
if serialized_adventure['is_visited'] == True:
lat = adventure.latitude
lon = adventure.longitude
if not lat or not lon:
continue
url = f"https://nominatim.openstreetmap.org/reverse?format=jsonv2&lat={lat}&lon={lon}"
headers = {'User-Agent': 'AdventureLog Server'}
response = requests.get(url, headers=headers)