mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-29 17:59:36 +02:00
feat: Add location_name to ReverseGeocode type and implement location fetching in stats view
This commit is contained in:
parent
60b5bbb3c8
commit
b5d6788c11
21 changed files with 1048 additions and 901 deletions
|
@ -48,4 +48,11 @@ class StatsViewSet(viewsets.ViewSet):
|
|||
'total_regions': total_regions,
|
||||
'visited_country_count': visited_country_count,
|
||||
'total_countries': total_countries
|
||||
})
|
||||
})
|
||||
|
||||
# locations - returns a list of all of the latitude, longitude locations of all public adventrues on the server
|
||||
@action(detail=False, methods=['get'], url_path='locations')
|
||||
def locations(self, request):
|
||||
adventures = Adventure.objects.filter(
|
||||
is_public=True).values('latitude', 'longitude', 'id', 'name')
|
||||
return Response(adventures)
|
Loading…
Add table
Add a link
Reference in a new issue