Change locationUrl to snake casing

This commit is contained in:
CasperVerswijvelt 2021-04-25 22:55:17 +02:00
parent 278306daa4
commit 32ae0aa5f3
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@
<p>Location</p> <p>Location</p>
<p class="label"> <p class="label">
{% if session.latitude %} {% if session.latitude %}
<a href="{{session|locationUrl}}" target="_blank">Open <a href="{{session|location_url}}" target="_blank">Open
in Maps &nearr;</a> in Maps &nearr;</a>
{% else %} {% else %}
Unknown Unknown

View File

@ -186,5 +186,5 @@ def urldisplay(url):
return url return url
@register.filter @register.filter
def locationUrl(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))