Fix widgets in pages

Mark Veidemanis 2 years ago
parent e3d57c9aa8
commit d2e0137c8d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F

@ -54,6 +54,7 @@ class ObjectList(ObjectNameMixin, ListView):
for arg in self.list_url_args:
list_url_args[arg] = locals()[arg]
orig_type = type
if type == "page":
type = "modal"
@ -90,8 +91,10 @@ class ObjectList(ObjectNameMixin, ListView):
# Return partials for HTMX
if self.request.htmx:
# self.template_name = self.list_template
context["window_content"] = self.list_template
if orig_type == "page":
self.template_name = self.list_template
else:
context["window_content"] = self.list_template
return self.render_to_response(context)

Loading…
Cancel
Save