From f6e502dfbdaebb2d2ad52dbaea3fb240b5e77ffc Mon Sep 17 00:00:00 2001 From: CasperVerswijvelt Date: Wed, 28 Apr 2021 21:50:05 +0200 Subject: [PATCH] Remove trailing dollar in long and lat placeholder --- TEMPLATE.env | 10 +++++----- app.json | 2 +- shynet/dashboard/templatetags/helpers.py | 2 +- shynet/shynet/settings.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/TEMPLATE.env b/TEMPLATE.env index 95388dd..ad5403c 100644 --- a/TEMPLATE.env +++ b/TEMPLATE.env @@ -85,10 +85,10 @@ BLOCK_ALL_IPS=False AGGRESSIVE_HASH_SALTING=True # Custom location url to link to in frontend. -# $LATITUDE$ will get replaced by the latitude, $LONGITUDE$ will get +# $LATITUDE will get replaced by the latitude, $LONGITUDE will get # replaced by the longitude. # Examples: -# - https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$ (default) -# - https://www.google.com/maps/search/?api=1&query=$LATITUDE$,$LONGITUDE$ -# - https://www.mapquest.com/near-$LATITUDE$,$LONGITUDE$ -LOCATION_URL=https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$ \ No newline at end of file +# - https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE (default) +# - https://www.google.com/maps/search/?api=1&query=$LATITUDE,$LONGITUDE +# - https://www.mapquest.com/near-$LATITUDE,$LONGITUDE +LOCATION_URL=https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE \ No newline at end of file diff --git a/app.json b/app.json index 68b9b97..c238587 100644 --- a/app.json +++ b/app.json @@ -125,7 +125,7 @@ }, "LOCATION_URL": { "description": "Custom location url to link to in frontend.", - "value": "https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$", + "value": "https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE", "required": false } } diff --git a/shynet/dashboard/templatetags/helpers.py b/shynet/dashboard/templatetags/helpers.py index 55d9f9f..e31bfe3 100644 --- a/shynet/dashboard/templatetags/helpers.py +++ b/shynet/dashboard/templatetags/helpers.py @@ -187,4 +187,4 @@ def urldisplay(url): @register.filter def location_url(session): - return settings.LOCATION_URL.replace("$LATITUDE$", str(session.latitude)).replace("$LONGITUDE$", str(session.longitude)) \ No newline at end of file + return settings.LOCATION_URL.replace("$LATITUDE", str(session.latitude)).replace("$LONGITUDE", str(session.longitude)) \ No newline at end of file diff --git a/shynet/shynet/settings.py b/shynet/shynet/settings.py index c5f2d7d..d3997dd 100644 --- a/shynet/shynet/settings.py +++ b/shynet/shynet/settings.py @@ -341,4 +341,4 @@ BLOCK_ALL_IPS = os.getenv("BLOCK_ALL_IPS", "False") == "True" AGGRESSIVE_HASH_SALTING = os.getenv("AGGRESSIVE_HASH_SALTING", "False") == "True" # What location url should be linked to in the frontend? -LOCATION_URL = os.getenv("LOCATION_URL", "https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$") +LOCATION_URL = os.getenv("LOCATION_URL", "https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE")