From 709f392226abe4ba716c237d38948ebfea13dde7 Mon Sep 17 00:00:00 2001 From: khadeom Date: Wed, 2 Jul 2025 08:59:08 +0530 Subject: [PATCH] feat: list_fullwidth for custom pages --- src/unfold/templates/admin/base.html | 4 ++-- src/unfold/templates/unfold/helpers/header.html | 2 +- src/unfold/views.py | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/unfold/templates/admin/base.html b/src/unfold/templates/admin/base.html index 4851efe8..e9c2ec0c 100644 --- a/src/unfold/templates/admin/base.html +++ b/src/unfold/templates/admin/base.html @@ -32,14 +32,14 @@ {% block messages %}
-
+
{% include "unfold/helpers/messages.html" %}
{% endblock messages %}
-
+
{% if cl %} {% tab_list "changelist" cl.opts %} {% elif opts %} diff --git a/src/unfold/templates/unfold/helpers/header.html b/src/unfold/templates/unfold/helpers/header.html index 972f66f8..d0245b96 100644 --- a/src/unfold/templates/unfold/helpers/header.html +++ b/src/unfold/templates/unfold/helpers/header.html @@ -3,7 +3,7 @@ {% if not is_popup %} {% block header %}
-
+
{% block usertools %} diff --git a/src/unfold/views.py b/src/unfold/views.py index 81118bd9..706c8e86 100644 --- a/src/unfold/views.py +++ b/src/unfold/views.py @@ -24,6 +24,7 @@ class UnfoldModelAdminViewMixin(PermissionRequiredMixin): """ model_admin = None + list_fullwidth = False def __init__(self, model_admin, **kwargs): self.model_admin = model_admin @@ -44,4 +45,5 @@ def get_context_data(self, **kwargs: Any) -> dict[str, Any]: **kwargs, **self.model_admin.admin_site.each_context(self.request), **{"title": self.title}, + **{"list_fullwidth": self.list_fullwidth}, )