summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-10-01 11:58:45 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-10-16 12:54:45 (GMT)
commite394264606c680355de5d25a2a223f5c2b85730e (patch)
tree9b63559c876c97cac5d84077329e897cea1a77a3
parent8a999615a306e96cc27c2b47c8c5fe079290be69 (diff)
downloadcombo-e394264606c680355de5d25a2a223f5c2b85730e.zip
combo-e394264606c680355de5d25a2a223f5c2b85730e.tar.gz
combo-e394264606c680355de5d25a2a223f5c2b85730e.tar.bz2
maps: compute GeoJSON URLs from templates (#36124)
-rw-r--r--combo/apps/maps/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/combo/apps/maps/models.py b/combo/apps/maps/models.py
index e9c9600..86fed18 100644
--- a/combo/apps/maps/models.py
+++ b/combo/apps/maps/models.py
@@ -30,7 +30,7 @@ import pyproj
from combo.data.models import CellBase
from combo.data.library import register_cell_class
-from combo.utils import requests
+from combo.utils import requests, get_templated_url
ICONS = [
@@ -156,7 +156,8 @@ class MapLayer(models.Model):
layer.save()
def get_geojson(self, request=None, multiple_layers=False):
- response = requests.get(self.geojson_url,
+ geojson_url = get_templated_url(self.geojson_url)
+ response = requests.get(geojson_url,
remote_service='auto',
cache_duration=self.cache_duration,
user=request.user if (request and self.include_user_identifier) else None,