Skip to content

Commit

Permalink
Merge pull request #603 from ropable/master
Browse files Browse the repository at this point in the history
Update environment variable mapproxy_url -> geoserver_url, update map view, update project dependency versions.
  • Loading branch information
RickWangPerth authored Sep 12, 2024
2 parents 40880ab + 9e90732 commit 172fb4a
Show file tree
Hide file tree
Showing 10 changed files with 432 additions and 393 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ The following variables are required for the project to run:

Variables below may also need to be defined (context-dependent):

SECRET_KEY="ThisIsASecretKey"
SECRET_KEY=ThisIsASecretKey
DEBUG=True
GEOSERVER_URL=https://geoserver.url/service

# Running

Expand Down
4 changes: 2 additions & 2 deletions kustomize/overlays/prod/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ spec:
secretKeyRef:
name: turtles-env-prod
key: SECRET_KEY
- name: MAPPROXY_URL
- name: GEOSERVER_URL
valueFrom:
secretKeyRef:
name: turtles-env-prod
key: MAPPROXY_URL
key: GEOSERVER_URL
- name: MAPBOX_TOKEN
valueFrom:
secretKeyRef:
Expand Down
4 changes: 2 additions & 2 deletions kustomize/overlays/uat/deployment_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ spec:
secretKeyRef:
name: turtles-env-uat
key: SECRET_KEY
- name: MAPPROXY_URL
- name: GEOSERVER_URL
valueFrom:
secretKeyRef:
name: turtles-env-uat
key: MAPPROXY_URL
key: GEOSERVER_URL
- name: MAPBOX_TOKEN
valueFrom:
secretKeyRef:
Expand Down
1 change: 0 additions & 1 deletion observations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ class MapView(TemplateView):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
context["mapproxy_url"] = settings.MAPPROXY_URL
context["page_title"] = f"{settings.SITE_CODE} | Map"
return context

Expand Down
508 changes: 262 additions & 246 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ django-nested-admin = "^4.0.2"
django-grappelli = "3.0.8"
django-bootstrap4 = "24.1"
django-easy-select2 = "1.5.8"
sentry-sdk = {version = "1.45.0", extras = ["django"]}
sentry-sdk = {version = "2.14.0", extras = ["django"]}

[tool.poetry.group.dev.dependencies]
ipython = "^8.23.0"
Expand Down
2 changes: 1 addition & 1 deletion wastd/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def template_context(request):
"site_title": settings.SITE_TITLE,
"site_acronym": settings.SITE_CODE,
"APPLICATION_VERSION_NO": settings.VERSION_NO,
"mapproxy_url": settings.MAPPROXY_URL,
"geoserver_url": settings.GEOSERVER_URL,
}
return context
2 changes: 1 addition & 1 deletion wastd/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
}
}
}
MAPPROXY_URL = os.environ.get("MAPPROXY_URL", "")
GEOSERVER_URL = os.environ.get("GEOSERVER_URL", "")
IMPORT_EXPORT_SKIP_ADMIN_CONFIRM = True

# Use the customised User model
Expand Down
Loading

0 comments on commit 172fb4a

Please sign in to comment.