summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-02-24 08:53:17 -0600
committerluxagraf <sng@luxagraf.net>2018-02-24 08:53:17 -0600
commitc0227932bc6609c66a6ecc7525f1a768f3a3fdb9 (patch)
tree0063e53433efa01c6ee268336c748ba9223fa93e /app
parentefd2d2f95aa2dc83cb8a881eb9b351fe8d6f857c (diff)
fixed a bug in map data builder
Diffstat (limited to 'app')
-rw-r--r--app/jrnl/build.py6
-rw-r--r--app/locations/urls.py5
2 files changed, 8 insertions, 3 deletions
diff --git a/app/jrnl/build.py b/app/jrnl/build.py
index 2c4d202..5b5d929 100644
--- a/app/jrnl/build.py
+++ b/app/jrnl/build.py
@@ -48,7 +48,8 @@ class BuildJrnl(BuildNew):
pages = self.get_pages(qs, 24)
for page in range(pages):
base_path = reverse("jrnl:list_country", kwargs={'slug': c.slug, 'page': page + 1})
- response = self.client.get(base_path, HTTP_HOST='127.0.0.1')
+ response = self.client.get(base_path)
+ print(response.content)
if page == 0:
self.write_file(base_path[:-2], response.content)
else:
@@ -67,8 +68,7 @@ class BuildJrnl(BuildNew):
base_path=reverse("map:maplist"),
paginate_by=1000000
)
- url = "/media/js/mainmap.js"
- response = self.client.get("/media/js/mainmap.js", HTTP_HOST='127.0.0.1')
+ response = self.client.get(reverse("map:mapdata"))
self.write_file("media/js/mainmap", response.content, 'js', '')
diff --git a/app/locations/urls.py b/app/locations/urls.py
index df9854a..abe9f0a 100644
--- a/app/locations/urls.py
+++ b/app/locations/urls.py
@@ -5,6 +5,11 @@ from . import views
app_name = "locations"
urlpatterns = [
+ path(
+ r'mapdata/',
+ views.MapDataList.as_view(),
+ name="mapdata"
+ ),
re_path(r'data/(?P<id>\d+)/$', views.data_json),
path(
r'',