Implement profit view and fix auto refresh

This commit is contained in:
2022-11-29 07:20:39 +00:00
parent 2b13802009
commit a39a5c3857
10 changed files with 192 additions and 84 deletions

View File

@@ -153,7 +153,9 @@ class ObjectList(RestrictedViewMixin, ObjectNameMixin, ListView):
# Return partials for HTMX
if self.request.htmx:
if orig_type == "page":
if request.headers["HX-Target"] == self.context_object_name + "-table":
self.template_name = self.list_template
elif orig_type == "page":
self.template_name = self.list_template
else:
context["window_content"] = self.list_template