From 536f2c8cbc3cb7521120aaf2f366d4e87e278ceb Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 15 Nov 2024 10:29:23 -0500 Subject: [PATCH 01/59] feat: created draw boundary option on Add Community Boundary page --- templates/communities/community-boundary.html | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/templates/communities/community-boundary.html b/templates/communities/community-boundary.html index 9a22c642a..8e68ce308 100644 --- a/templates/communities/community-boundary.html +++ b/templates/communities/community-boundary.html @@ -50,7 +50,23 @@

Add community boundary

- Option 1: Search the Native Land Digital database

+ Option 1: Drawing boundaries

+
+ +
+ +
+ Drawing boundaries +
+
+ Drawing community boundaries easily through our comprehensive mapping tool. +
+
+ +
+ +
+ Option 2: Search the Native Land Digital database

@@ -68,7 +84,7 @@

Add community boundary


- Option 2: Upload a shapefile

+ Option 3: Upload a shapefile

From 1856050869d3a5637a47d008d8fc2ef5b540e8dd Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 15 Nov 2024 10:45:45 -0500 Subject: [PATCH 02/59] feat: created view for drawing boundary --- communities/urls.py | 1 + communities/views.py | 6 + templates/communities/community-boundary.html | 2 +- .../communities/draw-community-boundary.html | 297 ++++++++++++++++++ 4 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 templates/communities/draw-community-boundary.html diff --git a/communities/urls.py b/communities/urls.py index acd8f9ef1..fa4797789 100644 --- a/communities/urls.py +++ b/communities/urls.py @@ -7,6 +7,7 @@ path('connect-community/', views.connect_community, name="connect-community"), path('create-community/', views.create_community, name="create-community"), path('community-boundary/', views.community_boundary, name="community-boundary"), + path('draw-community-boundary/', views.add_community_boundary, name="draw-community-boundary"), path('add-community-boundary/', views.add_community_boundary, name="add-community-boundary"), path('upload-boundary-file/', views.upload_boundary_file, name="upload-boundary-file"), path('registration-boundary', views.registration_boundary, name="registration-boundary"), diff --git a/communities/views.py b/communities/views.py index bccab2a59..6cd80bb86 100644 --- a/communities/views.py +++ b/communities/views.py @@ -163,6 +163,12 @@ def community_boundary(request): return render(request, 'communities/community-boundary.html') +@has_new_community_id +@login_required(login_url='login') +def draw_community_boundary(request): + return render(request, 'communities/draw-community-boundary.html') + + @has_new_community_id @login_required(login_url='login') def add_community_boundary(request): diff --git a/templates/communities/community-boundary.html b/templates/communities/community-boundary.html index 8e68ce308..617a92c6e 100644 --- a/templates/communities/community-boundary.html +++ b/templates/communities/community-boundary.html @@ -54,7 +54,7 @@

Add community boundary

- +
Drawing boundaries
diff --git a/templates/communities/draw-community-boundary.html b/templates/communities/draw-community-boundary.html new file mode 100644 index 000000000..18beb5a69 --- /dev/null +++ b/templates/communities/draw-community-boundary.html @@ -0,0 +1,297 @@ +{% extends 'register-base.html' %} {% block title %} Add Community {% endblock %} {% load static %} {% block card %} {% load custom_api_tags %} + +
+

Search the Native Land Digital database

+

+ Search the Native Land Digital database to select your community’s boundary. + After making a selection, view the location on Native Land Digital’s website to confirm + the selected boundary is appropriate. If your boundary is not appropriate, + please contact Native Land Digital. +

+ + +
+
+ +
+
+
+ + + +
+ +
+ + + + +{% endblock %} \ No newline at end of file From e0a455ef1d9d873d9a440780ecbc0690a8af4d23 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Mon, 18 Nov 2024 14:07:22 -0500 Subject: [PATCH 03/59] feat: modified html of drawing boundary page --- communities/urls.py | 2 +- .../communities/draw-community-boundary.html | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/communities/urls.py b/communities/urls.py index fa4797789..89ded79dc 100644 --- a/communities/urls.py +++ b/communities/urls.py @@ -7,7 +7,7 @@ path('connect-community/', views.connect_community, name="connect-community"), path('create-community/', views.create_community, name="create-community"), path('community-boundary/', views.community_boundary, name="community-boundary"), - path('draw-community-boundary/', views.add_community_boundary, name="draw-community-boundary"), + path('draw-community-boundary/', views.draw_community_boundary, name="draw-community-boundary"), path('add-community-boundary/', views.add_community_boundary, name="add-community-boundary"), path('upload-boundary-file/', views.upload_boundary_file, name="upload-boundary-file"), path('registration-boundary', views.registration_boundary, name="registration-boundary"), diff --git a/templates/communities/draw-community-boundary.html b/templates/communities/draw-community-boundary.html index 18beb5a69..9e29a9c1f 100644 --- a/templates/communities/draw-community-boundary.html +++ b/templates/communities/draw-community-boundary.html @@ -111,22 +111,20 @@ }
-

Search the Native Land Digital database

+

Add Community boundaries

- Search the Native Land Digital database to select your community’s boundary. - After making a selection, view the location on Native Land Digital’s website to confirm - the selected boundary is appropriate. If your boundary is not appropriate, - please contact Native Land Digital. + Draw your community boundaries on the map below. + Use the search bar to locate your area, + and mark your boundaries using the circle or line tools.

-
@@ -249,7 +247,7 @@

Search the Native Land Digital database

// do post call to get boundary const href = document.querySelector('#community-boundary-continue-btn').getAttribute('href') const slug = document.querySelector('#selected-title').getAttribute('data-slug') - + const url = `{% url 'nld-data' %}?slug=${slug}` const boundaryResponse = await fetch(url) const boundaryData = await boundaryResponse.json() @@ -261,7 +259,7 @@

Search the Native Land Digital database

alert(errorMessage) throw new Error(errorMessage) } - + const boundaryCoordinates = boundaryData.coordinates[0][0] // reorder so (lon, lat)'s become (lat, lon)'s boundaryCoordinates.map(row=>row.reverse()) From 30d3a677a20bd6bd0f250224be9286285960e7ef Mon Sep 17 00:00:00 2001 From: lc_hd Date: Thu, 21 Nov 2024 15:40:24 -0500 Subject: [PATCH 04/59] feat: created endpoint for geocoding api --- helpers/views.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/helpers/views.py b/helpers/views.py index 400b397c7..822b303cf 100644 --- a/helpers/views.py +++ b/helpers/views.py @@ -1,4 +1,5 @@ import json +import os from django.core.cache import cache from django.shortcuts import render, redirect, get_object_or_404 @@ -6,6 +7,7 @@ from django.http import HttpResponse, Http404, JsonResponse from django.conf import settings from django.views.decorators.clickjacking import xframe_options_sameorigin +from rest_framework.status import HTTP_500_INTERNAL_SERVER_ERROR from communities.models import InviteMember, Community from notifications.models import UserNotification @@ -187,3 +189,41 @@ def native_land_data(request): raise Http404(f'Unable to Retrieve Specific NLD Slug Data for {slug}') return JsonResponse(slug_data) + + +@login_required(login_url='login') +def geocoding_api(request): + """ + Forwards request to our geocoding api provider. + Then returns latitude and longitude of input location + """ + max_input_string_length = 100 + location = request.GET.get('location')[:max_input_string_length] + + if location is None: + raise Http404('Location Variable Is Not Defined In Request') + + open_weather_map_api_key = os.getenv('OPEN_WEATHER_MAP_API_KEY') + if open_weather_map_api_key is None: + raise HTTP_500_INTERNAL_SERVER_ERROR('Api Key Is Not Defined') + + url = ( + f'https://api.openweathermap.org' + f'/geo/1.0/direct?q={location}&appid={open_weather_map_api_key}' + ) + geo_coding_response = requests.get(url) + try: + geocoding_data = geo_coding_response.json()[0] + except ( + requests.exceptions.Timeout, + requests.exceptions.ConnectionError, + requests.exceptions.HTTPError + ): + raise Http404('Unable to Retrieve Geocoding Data') + + response_data = { + 'name': geocoding_data['name'], + 'lat': geocoding_data['lat'], + 'lon': geocoding_data['lon'], + } + return JsonResponse(response_data) From e9baad4fd8f754861b73e31846cb242c3b1e5dc5 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Thu, 21 Nov 2024 15:47:09 -0500 Subject: [PATCH 05/59] feat: added geocoding_api to urls --- helpers/urls.py | 1 + 1 file changed, 1 insertion(+) diff --git a/helpers/urls.py b/helpers/urls.py index b934e6654..a2838cf4a 100644 --- a/helpers/urls.py +++ b/helpers/urls.py @@ -12,4 +12,5 @@ path('project-boundary-view/', views.project_boundary_view, name="project-boundary-view"), path('boundary-preview/', views.boundary_preview, name="boundary-preview"), path('nld-data/', views.native_land_data, name="nld-data"), + path('geocoding-api/', views.geocoding_api, name="geocoding-api"), ] From c649e38db2ea41743c2a241eb194e32883bc2f69 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Thu, 21 Nov 2024 16:09:00 -0500 Subject: [PATCH 06/59] feat: created testcase for missing location variable in request --- helpers/views.py | 5 +-- tests/functional/test_geocoding_api_view.py | 34 +++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 tests/functional/test_geocoding_api_view.py diff --git a/helpers/views.py b/helpers/views.py index 822b303cf..6d9e84b3a 100644 --- a/helpers/views.py +++ b/helpers/views.py @@ -198,11 +198,12 @@ def geocoding_api(request): Then returns latitude and longitude of input location """ max_input_string_length = 100 - location = request.GET.get('location')[:max_input_string_length] - if location is None: + if request.GET.get('location') is None: raise Http404('Location Variable Is Not Defined In Request') + location = request.GET.get('location')[:max_input_string_length] + open_weather_map_api_key = os.getenv('OPEN_WEATHER_MAP_API_KEY') if open_weather_map_api_key is None: raise HTTP_500_INTERNAL_SERVER_ERROR('Api Key Is Not Defined') diff --git a/tests/functional/test_geocoding_api_view.py b/tests/functional/test_geocoding_api_view.py new file mode 100644 index 000000000..64217e6f5 --- /dev/null +++ b/tests/functional/test_geocoding_api_view.py @@ -0,0 +1,34 @@ +from django.urls import reverse +from django.core.cache import cache +from django.contrib.auth.models import User +from django.test import Client, TransactionTestCase + + +class TestFeatures(TransactionTestCase): + def setUp(self): + self.client = Client() + username = 'user' + pw = 'pw' + self.user = User.objects.create_user( + username=username, + password=pw + ) + logged_in = self.client.login( + username=username, + password=pw + ) + self.assertTrue(logged_in, 'Login failed') + + # clear cache since view function modifies the cache + cache.clear() + + def test_error_raised_when_location_is_not_defined_in_get_request(self): + """ + When the get request does not contain a location, it should raise an error. + """ + expected_message = 'Location Variable Is Not Defined In Request' + response = self.client.get( + reverse('geocoding-api') + ) + self.assertEqual(response.status_code, 404) + self.assertEqual(response.context['exception'], expected_message) From 44419be3b598cf0ce91c48a58b157338c33a9a2b Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 22 Nov 2024 11:37:39 -0500 Subject: [PATCH 07/59] feat: created testcase and fixed error --- helpers/views.py | 2 +- tests/functional/test_geocoding_api_view.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/helpers/views.py b/helpers/views.py index 6d9e84b3a..9173df3b2 100644 --- a/helpers/views.py +++ b/helpers/views.py @@ -206,7 +206,7 @@ def geocoding_api(request): open_weather_map_api_key = os.getenv('OPEN_WEATHER_MAP_API_KEY') if open_weather_map_api_key is None: - raise HTTP_500_INTERNAL_SERVER_ERROR('Api Key Is Not Defined') + return HttpResponse(status=HTTP_500_INTERNAL_SERVER_ERROR) url = ( f'https://api.openweathermap.org' diff --git a/tests/functional/test_geocoding_api_view.py b/tests/functional/test_geocoding_api_view.py index 64217e6f5..fbf2fe0af 100644 --- a/tests/functional/test_geocoding_api_view.py +++ b/tests/functional/test_geocoding_api_view.py @@ -32,3 +32,18 @@ def test_error_raised_when_location_is_not_defined_in_get_request(self): ) self.assertEqual(response.status_code, 404) self.assertEqual(response.context['exception'], expected_message) + + def test_error_raised_when_api_key_is_not_defined_in_backend(self): + """ + When backend does not define an api_key, it should raise an error. + """ + expected_message = 'Api Key Is Not Defined' + get_variables = { + 'location': 'some-location', + } + response = self.client.get( + reverse('geocoding-api'), + data=get_variables + ) + self.assertEqual(response.status_code, 500) + self.assertEqual(response.context['exception'], expected_message) From 0d7b4b651c8c9edc8e82d4632889fc1b11bbb8a4 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 22 Nov 2024 11:47:37 -0500 Subject: [PATCH 08/59] feat: updated test --- tests/functional/test_geocoding_api_view.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/functional/test_geocoding_api_view.py b/tests/functional/test_geocoding_api_view.py index fbf2fe0af..8d7718971 100644 --- a/tests/functional/test_geocoding_api_view.py +++ b/tests/functional/test_geocoding_api_view.py @@ -46,4 +46,3 @@ def test_error_raised_when_api_key_is_not_defined_in_backend(self): data=get_variables ) self.assertEqual(response.status_code, 500) - self.assertEqual(response.context['exception'], expected_message) From 1cd84a9671ac6e2b09f0270748410630be5c3ca6 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 22 Nov 2024 12:35:54 -0500 Subject: [PATCH 09/59] feat: created testcase when request to geocoder api provider fails --- helpers/views.py | 3 ++- tests/functional/test_geocoding_api_view.py | 25 ++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/helpers/views.py b/helpers/views.py index 9173df3b2..4d9256ef1 100644 --- a/helpers/views.py +++ b/helpers/views.py @@ -212,8 +212,9 @@ def geocoding_api(request): f'https://api.openweathermap.org' f'/geo/1.0/direct?q={location}&appid={open_weather_map_api_key}' ) - geo_coding_response = requests.get(url) + try: + geo_coding_response = requests.get(url) geocoding_data = geo_coding_response.json()[0] except ( requests.exceptions.Timeout, diff --git a/tests/functional/test_geocoding_api_view.py b/tests/functional/test_geocoding_api_view.py index 8d7718971..8c0654301 100644 --- a/tests/functional/test_geocoding_api_view.py +++ b/tests/functional/test_geocoding_api_view.py @@ -1,3 +1,7 @@ +import os +from unittest.mock import patch + +import requests from django.urls import reverse from django.core.cache import cache from django.contrib.auth.models import User @@ -37,7 +41,6 @@ def test_error_raised_when_api_key_is_not_defined_in_backend(self): """ When backend does not define an api_key, it should raise an error. """ - expected_message = 'Api Key Is Not Defined' get_variables = { 'location': 'some-location', } @@ -46,3 +49,23 @@ def test_error_raised_when_api_key_is_not_defined_in_backend(self): data=get_variables ) self.assertEqual(response.status_code, 500) + + def test_error_raised_when_retrieving_the_lat_lon_fails(self): + """ + When the getting the lat and lon from the Geocoding Provider + fails, it should raise an error. + """ + get_variables = { + 'location': 'some-location', + } + expected_message = 'Unable to Retrieve Geocoding Data' + os.environ['OPEN_WEATHER_MAP_API_KEY'] = 'placeholder-apikey' + + with patch('helpers.views.requests.get') as mock_function: + mock_function.side_effect = requests.exceptions.HTTPError('Some Error Occurred') + response = self.client.get( + reverse('geocoding-api'), + data=get_variables + ) + self.assertEqual(response.status_code, 404) + self.assertEqual(response.context['exception'], expected_message) From 0db4eabb1922aa2d63e92cce83985fc793a4fa95 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Fri, 22 Nov 2024 17:42:39 -0500 Subject: [PATCH 10/59] feat: created test for the successful case --- tests/functional/test_geocoding_api_view.py | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/functional/test_geocoding_api_view.py b/tests/functional/test_geocoding_api_view.py index 8c0654301..63cb34a1f 100644 --- a/tests/functional/test_geocoding_api_view.py +++ b/tests/functional/test_geocoding_api_view.py @@ -1,4 +1,5 @@ import os +import unittest from unittest.mock import patch import requests @@ -69,3 +70,24 @@ def test_error_raised_when_retrieving_the_lat_lon_fails(self): ) self.assertEqual(response.status_code, 404) self.assertEqual(response.context['exception'], expected_message) + + def test_success_when_retrieving_lat_lon(self): + get_variables = { + 'location': 'some-location', + } + os.environ['OPEN_WEATHER_MAP_API_KEY'] = 'placeholder-apikey' + mock_response = unittest.mock.MagicMock() + mock_response.json.return_value = [{ + 'name': 'placeholder-name', + 'lat': 'placeholder-lat', + 'lon': 'placeholder-lon', + }] + + with patch('helpers.views.requests.get') as mock_function: + mock_function.return_value = mock_response + response = self.client.get( + reverse('geocoding-api'), + data=get_variables + ) + self.assertEqual(response.status_code, 200) + self.assertEqual(response.json(), mock_response.json.return_value[0]) From 4cef5600dd6ff8ce083757ee8384f13ddc9d188b Mon Sep 17 00:00:00 2001 From: lc_hd Date: Mon, 25 Nov 2024 20:05:35 -0500 Subject: [PATCH 11/59] feat: created file with world regions --- localcontexts/static/json/WorldRegions.json | 128 ++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 localcontexts/static/json/WorldRegions.json diff --git a/localcontexts/static/json/WorldRegions.json b/localcontexts/static/json/WorldRegions.json new file mode 100644 index 000000000..41c6d75b1 --- /dev/null +++ b/localcontexts/static/json/WorldRegions.json @@ -0,0 +1,128 @@ +[ + { + "region": "Northern Africa", + "lat-lon": [32.320583, 9.803229] + }, + { + "region": "Southern Africa", + "lat-lon": [-32.274286, 22.011343] + }, + { + "region": "Central Africa", + "lat-lon": [5.137965, 25.240858] + }, + { + "region": "Eastern Africa", + "lat-lon": [-2.106169, 39.522977] + }, + { + "region": "Western Africa", + "lat-lon": [12.101225, -14.780815] + }, + + + { + "region": "Northern America", + "lat-lon": [37.693449, -101.780213] + }, + { + "region": "Central America", + "lat-lon": [13.989996, -87.375443] + }, + { + "region": "Southern America", + "lat-lon": [-11.159831, -57.974516] + }, + + + { + "region": "West Indies", + "lat-lon": [19.071591, -75.626407] + }, + + + { + "region": "Northern Europe", + "lat-lon": [69.084788, 21.456927] + }, + { + "region": "Central Europe", + "lat-lon": [48.781150, 13.870088] + }, + { + "region": "Southeast Europe", + "lat-lon": [41.417291, 27.803158] + }, + { + "region": "Southwest Europe", + "lat-lon": [36.707788, -5.865912] + }, + { + "region": "Eastern Europe", + "lat-lon": [49.854485, 26.373646] + }, + { + "region": "Western Europe", + "lat-lon": [48.917763, -0.900168] + }, + + + { + "region": "Middle East", + "lat-lon": [32.638118, 36.134550] + }, + + + { + "region": "Eastern Asia", + "lat-lon": [32.340462, 75.224219] + }, + { + "region": "Central Asia", + "lat-lon": [33.687303, 94.133847] + }, + { + "region": "Northern Asia", + "lat-lon": [59.039858, 81.647848] + }, + { + "region": "Southeastern Asia", + "lat-lon": [10.749795, 106.802025] + }, + { + "region": "Southwestern Asia", + "lat-lon": [9.257824, 77.473901] + }, + + + { + "region": "Northern Oceania", + "lat-lon": [10.855851, 145.875907] + }, + { + "region": "Central Oceania", + "lat-lon": [-10.879485, 165.523154] + }, + { + "region": "Southern Oceania", + "lat-lon": [-45.744602, 168.668840] + }, + { + "region": "Southwestern Oceania", + "lat-lon": [-26.654914, 133.219582] + }, + { + "region": "Southeastern Oceania", + "lat-lon": [-22.945764, -134.516414] + }, + + + { + "region": "Arctic Circle", + "lat-lon": [] + }, + { + "region": "Antarctica", + "lat-lon": [] + } +] \ No newline at end of file From f9ddb1910882fbe3ab16b7c37014bd878dba3723 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Mon, 25 Nov 2024 20:35:02 -0500 Subject: [PATCH 12/59] feat: changed key from lat-lon to lat_lon --- localcontexts/static/json/WorldRegions.json | 56 ++++++++++----------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/localcontexts/static/json/WorldRegions.json b/localcontexts/static/json/WorldRegions.json index 41c6d75b1..0aac63871 100644 --- a/localcontexts/static/json/WorldRegions.json +++ b/localcontexts/static/json/WorldRegions.json @@ -1,128 +1,128 @@ [ { "region": "Northern Africa", - "lat-lon": [32.320583, 9.803229] + "lat_lon": [32.320583, 9.803229] }, { "region": "Southern Africa", - "lat-lon": [-32.274286, 22.011343] + "lat_lon": [-32.274286, 22.011343] }, { "region": "Central Africa", - "lat-lon": [5.137965, 25.240858] + "lat_lon": [5.137965, 25.240858] }, { "region": "Eastern Africa", - "lat-lon": [-2.106169, 39.522977] + "lat_lon": [-2.106169, 39.522977] }, { "region": "Western Africa", - "lat-lon": [12.101225, -14.780815] + "lat_lon": [12.101225, -14.780815] }, { "region": "Northern America", - "lat-lon": [37.693449, -101.780213] + "lat_lon": [37.693449, -101.780213] }, { "region": "Central America", - "lat-lon": [13.989996, -87.375443] + "lat_lon": [13.989996, -87.375443] }, { "region": "Southern America", - "lat-lon": [-11.159831, -57.974516] + "lat_lon": [-11.159831, -57.974516] }, { "region": "West Indies", - "lat-lon": [19.071591, -75.626407] + "lat_lon": [19.071591, -75.626407] }, { "region": "Northern Europe", - "lat-lon": [69.084788, 21.456927] + "lat_lon": [69.084788, 21.456927] }, { "region": "Central Europe", - "lat-lon": [48.781150, 13.870088] + "lat_lon": [48.781150, 13.870088] }, { "region": "Southeast Europe", - "lat-lon": [41.417291, 27.803158] + "lat_lon": [41.417291, 27.803158] }, { "region": "Southwest Europe", - "lat-lon": [36.707788, -5.865912] + "lat_lon": [36.707788, -5.865912] }, { "region": "Eastern Europe", - "lat-lon": [49.854485, 26.373646] + "lat_lon": [49.854485, 26.373646] }, { "region": "Western Europe", - "lat-lon": [48.917763, -0.900168] + "lat_lon": [48.917763, -0.900168] }, { "region": "Middle East", - "lat-lon": [32.638118, 36.134550] + "lat_lon": [32.638118, 36.134550] }, { "region": "Eastern Asia", - "lat-lon": [32.340462, 75.224219] + "lat_lon": [32.340462, 75.224219] }, { "region": "Central Asia", - "lat-lon": [33.687303, 94.133847] + "lat_lon": [33.687303, 94.133847] }, { "region": "Northern Asia", - "lat-lon": [59.039858, 81.647848] + "lat_lon": [59.039858, 81.647848] }, { "region": "Southeastern Asia", - "lat-lon": [10.749795, 106.802025] + "lat_lon": [10.749795, 106.802025] }, { "region": "Southwestern Asia", - "lat-lon": [9.257824, 77.473901] + "lat_lon": [9.257824, 77.473901] }, { "region": "Northern Oceania", - "lat-lon": [10.855851, 145.875907] + "lat_lon": [10.855851, 145.875907] }, { "region": "Central Oceania", - "lat-lon": [-10.879485, 165.523154] + "lat_lon": [-10.879485, 165.523154] }, { "region": "Southern Oceania", - "lat-lon": [-45.744602, 168.668840] + "lat_lon": [-45.744602, 168.668840] }, { "region": "Southwestern Oceania", - "lat-lon": [-26.654914, 133.219582] + "lat_lon": [-26.654914, 133.219582] }, { "region": "Southeastern Oceania", - "lat-lon": [-22.945764, -134.516414] + "lat_lon": [-22.945764, -134.516414] }, { "region": "Arctic Circle", - "lat-lon": [] + "lat_lon": [] }, { "region": "Antarctica", - "lat-lon": [] + "lat_lon": [] } ] \ No newline at end of file From 36eed2f0a80078c00adb8c4be01fbb6de0adec56 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Mon, 25 Nov 2024 21:00:05 -0500 Subject: [PATCH 13/59] feat: updated draw-community-boundary in account creation so it populates dropown with world region data --- .../communities/draw-community-boundary.html | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/templates/communities/draw-community-boundary.html b/templates/communities/draw-community-boundary.html index 9e29a9c1f..5162a9fba 100644 --- a/templates/communities/draw-community-boundary.html +++ b/templates/communities/draw-community-boundary.html @@ -182,21 +182,23 @@

Add Community boundaries

+

Add Community boundaries

@@ -146,7 +154,7 @@

Add Community boundaries

- @@ -170,7 +178,7 @@

Add Community boundaries

From 94f779434bb04f5964e3deba28d8f80a49f82613 Mon Sep 17 00:00:00 2001 From: lc_hd Date: Wed, 11 Dec 2024 10:07:52 -0500 Subject: [PATCH 36/59] feat: updated syle of map modal --- templates/snippets/modals/map-modal.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/snippets/modals/map-modal.html b/templates/snippets/modals/map-modal.html index 249f2bb92..38dace49b 100644 --- a/templates/snippets/modals/map-modal.html +++ b/templates/snippets/modals/map-modal.html @@ -1,6 +1,11 @@ @@ -8,7 +13,7 @@