From c5856ce20bf8316e35c74dcfd9f2d2f044c0396e Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Fri, 10 Feb 2023 07:20:22 +0000 Subject: [PATCH] Use HX-Replace-Url properly and don't include column shifter twice on load --- core/templates/partials/results_load.html | 1 - core/views/ui/drilldown.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/templates/partials/results_load.html b/core/templates/partials/results_load.html index 4538e26..c4f11dc 100644 --- a/core/templates/partials/results_load.html +++ b/core/templates/partials/results_load.html @@ -7,7 +7,6 @@ {% block panel_content %} {% include 'partials/notify.html' %} - {% if cache is not None %} diff --git a/core/views/ui/drilldown.py b/core/views/ui/drilldown.py index 5c12dd3..deaef8c 100644 --- a/core/views/ui/drilldown.py +++ b/core/views/ui/drilldown.py @@ -209,9 +209,9 @@ class DrilldownTableView(SingleTableView): # Still push the URL so they can share it to get assistance if request.GET: if request.htmx: - response["HX-Replace"] = reverse("home") + "?" + url_params + response["HX-Replace-Url"] = reverse("home") + "?" + url_params elif request.POST: - response["HX-Replace"] = reverse("home") + "?" + url_params + response["HX-Replace-Url"] = reverse("home") + "?" + url_params return response # Create data for chart.js sentiment graph @@ -265,7 +265,7 @@ class DrilldownTableView(SingleTableView): response = self.render_to_response(context) # if not request.method == "GET": if "client_uri" in context: - response["HX-Replace"] = reverse("home") + "?" + context["client_uri"] + response["HX-Replace-Url"] = reverse("home") + "?" + context["client_uri"] return response def post(self, request, *args, **kwargs):