Remove trailing dollar in long and lat placeholder

This commit is contained in:
CasperVerswijvelt 2021-04-28 21:50:05 +02:00
parent 32ae0aa5f3
commit f6e502dfbd
4 changed files with 8 additions and 8 deletions

View File

@ -85,10 +85,10 @@ BLOCK_ALL_IPS=False
AGGRESSIVE_HASH_SALTING=True AGGRESSIVE_HASH_SALTING=True
# Custom location url to link to in frontend. # 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. # replaced by the longitude.
# Examples: # Examples:
# - https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$ (default) # - https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE (default)
# - https://www.google.com/maps/search/?api=1&query=$LATITUDE$,$LONGITUDE$ # - https://www.google.com/maps/search/?api=1&query=$LATITUDE,$LONGITUDE
# - https://www.mapquest.com/near-$LATITUDE$,$LONGITUDE$ # - https://www.mapquest.com/near-$LATITUDE,$LONGITUDE
LOCATION_URL=https://www.openstreetmap.org/?mlat=$LATITUDE$&mlon=$LONGITUDE$ LOCATION_URL=https://www.openstreetmap.org/?mlat=$LATITUDE&mlon=$LONGITUDE

View File

@ -125,7 +125,7 @@
}, },
"LOCATION_URL": { "LOCATION_URL": {
"description": "Custom location url to link to in frontend.", "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 "required": false
} }
} }

View File

@ -187,4 +187,4 @@ def urldisplay(url):
@register.filter @register.filter
def location_url(session): def location_url(session):
return settings.LOCATION_URL.replace("$LATITUDE$", str(session.latitude)).replace("$LONGITUDE$", str(session.longitude)) return settings.LOCATION_URL.replace("$LATITUDE", str(session.latitude)).replace("$LONGITUDE", str(session.longitude))

View File

@ -341,4 +341,4 @@ BLOCK_ALL_IPS = os.getenv("BLOCK_ALL_IPS", "False") == "True"
AGGRESSIVE_HASH_SALTING = os.getenv("AGGRESSIVE_HASH_SALTING", "False") == "True" AGGRESSIVE_HASH_SALTING = os.getenv("AGGRESSIVE_HASH_SALTING", "False") == "True"
# What location url should be linked to in the frontend? # 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")