From c0227932bc6609c66a6ecc7525f1a768f3a3fdb9 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 24 Feb 2018 08:53:17 -0600 Subject: fixed a bug in map data builder --- app/jrnl/build.py | 6 +++--- app/locations/urls.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'app') 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\d+)/$', views.data_json), path( r'', -- cgit v1.2.3-70-g09d2