Fix widgets in pages

This commit is contained in:
Mark Veidemanis 2022-11-14 17:14:47 +00:00
parent e3d57c9aa8
commit d2e0137c8d
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 5 additions and 2 deletions

View File

@ -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)