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:
parent
bcbe7657ad
commit
0588555707
13 changed files with 89 additions and 37 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue