From 11825b4dbb8d6b0498213c41c961049ebd932ed2 Mon Sep 17 00:00:00 2001 From: Tamar Cohen Date: Thu, 12 Oct 2017 17:32:48 -0700 Subject: [PATCH] fixed kml export to work over rest --- xgds_planner2/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xgds_planner2/views.py b/xgds_planner2/views.py index 9948a6e..c829deb 100644 --- a/xgds_planner2/views.py +++ b/xgds_planner2/views.py @@ -67,6 +67,7 @@ from xgds_planner2.xpjson import loadDocumentFromDict from xgds_map_server.views import getSearchForms from xgds_core.views import get_handlebars_templates, addRelay +from xgds_core.util import insertIntoPath from xgds_map_server.forms import MapSearchForm from geocamUtil.datetimeJsonEncoder import DatetimeJsonEncoder @@ -555,7 +556,8 @@ def getPlanIndexKml(request): for plan in plans: fname = '%s.kml' % plan.escapedName() relUrl = reverse('planner2_planExport', args=[plan.uuid, fname]) - url = request.build_absolute_uri(relUrl) + restUrl = insertIntoPath(relUrl, 'rest') + url = request.build_absolute_uri(restUrl) # print(url) out.write("""