From aaf1528426205c679bb0730d53eb004b6564bd92 Mon Sep 17 00:00:00 2001 From: Martin Bauer Date: Sat, 5 Jan 2019 12:48:20 +0100 Subject: [PATCH] Location field problems fixed --- eventplanner/templates/eventplanner/event_update_form.html | 1 - .../templates/eventplanner/routeToEventMap.inc.html | 2 +- location_field/widgets.py | 6 ++---- website/templates/website/base.html | 5 +++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/eventplanner/templates/eventplanner/event_update_form.html b/eventplanner/templates/eventplanner/event_update_form.html index 29d235e..64d941e 100644 --- a/eventplanner/templates/eventplanner/event_update_form.html +++ b/eventplanner/templates/eventplanner/event_update_form.html @@ -7,7 +7,6 @@ {% block content %} -{{ form.media }}
diff --git a/eventplanner/templates/eventplanner/routeToEventMap.inc.html b/eventplanner/templates/eventplanner/routeToEventMap.inc.html index 3e939ac..c392110 100644 --- a/eventplanner/templates/eventplanner/routeToEventMap.inc.html +++ b/eventplanner/templates/eventplanner/routeToEventMap.inc.html @@ -18,7 +18,7 @@ {% if route %} {% addtoblock "css" strip %}{% endaddtoblock %} -{% addtoblock "js" strip %}{% endaddtoblock %} +{% addtoblock "js" strip %}{% endaddtoblock %} {% addtoblock "js" %} diff --git a/location_field/widgets.py b/location_field/widgets.py index 9cc6c84..43617d8 100644 --- a/location_field/widgets.py +++ b/location_field/widgets.py @@ -48,11 +48,9 @@ class LocationWidget(widgets.TextInput): } # Use schemaless URL so it works with both, http and https websites js = ( - #'//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', # jquery - #'//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js', '/static/js/jquery-ui-1.10.0.custom.min.js', - #'//maps.google.com/maps/api/js?sensor=false&language=de&key={}'.format(settings.GOOGLE_MAPS_API_KEY), - '//maps.google.com/maps/api/js?sensor=false&language=de', + '//maps.google.com/maps/api/js?sensor=false&language=de&key={}'.format(settings.GOOGLE_MAPS_API_KEY), + #'//maps.google.com/maps/api/js?sensor=false&language=de', '/static/js/bindWithDelay.js', '/location_field/media/form.js', ) diff --git a/website/templates/website/base.html b/website/templates/website/base.html index 21324fe..8e38295 100644 --- a/website/templates/website/base.html +++ b/website/templates/website/base.html @@ -11,6 +11,8 @@ {% render_block "css" %} + {% render_block "js" %} + @@ -81,8 +83,7 @@ - {% render_block "js" %} - +