From a49a5c5079786400fa28a75ff9f055f25a01a883 Mon Sep 17 00:00:00 2001 From: csae8092 Date: Tue, 26 Nov 2024 08:33:52 +0100 Subject: [PATCH] hot fix for json-download of network data --- network/templates/network/list_view.html | 8 ++------ network/views.py | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/network/templates/network/list_view.html b/network/templates/network/list_view.html index 326466c..850d887 100644 --- a/network/templates/network/list_view.html +++ b/network/templates/network/list_view.html @@ -16,7 +16,7 @@

Download

CSV - JSON + JSON
@@ -84,11 +84,7 @@

{{ total }} Result(s)

{% endblock pagination.allpages %} - {% if download %} -
- {% include "browsing/partials/download_menu.html" %} -
- {% endif %} +
diff --git a/network/views.py b/network/views.py index bf6cb85..0e389d4 100644 --- a/network/views.py +++ b/network/views.py @@ -54,6 +54,7 @@ def network_data(request): df["end_date"] = df["end_date"].dt.strftime("%Y-%m-%d").fillna("") out = df.to_json(orient="index", force_ascii=False) response = JsonResponse(json.loads(out)) + return response elif format == "cosmograph": data = {} edge_data = df.apply(