From 40b880883a84f9c8d52fb2c227a5bc40d444fc3b Mon Sep 17 00:00:00 2001 From: Eric Holscher <25510+ericholscher@users.noreply.github.com> Date: Tue, 5 Nov 2024 02:54:32 -0800 Subject: [PATCH] Admin: Make large inlines collapse by default (#11717) --- readthedocs/builds/admin.py | 1 + readthedocs/projects/admin.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/readthedocs/builds/admin.py b/readthedocs/builds/admin.py index fe19cedff8c..0e0429a6ec1 100644 --- a/readthedocs/builds/admin.py +++ b/readthedocs/builds/admin.py @@ -18,6 +18,7 @@ class BuildCommandResultInline(admin.TabularInline): model = BuildCommandResult fields = ("command", "exit_code", "output") + classes = ["collapse"] @admin.register(Build) diff --git a/readthedocs/projects/admin.py b/readthedocs/projects/admin.py index e38aab29ce2..f8c6a7160b5 100644 --- a/readthedocs/projects/admin.py +++ b/readthedocs/projects/admin.py @@ -74,6 +74,7 @@ class VersionInline(ReadOnlyInlineMixin, admin.TabularInline): formset = VersionInlineFormSet model = Version + classes = ["collapse"] def get_queryset(self, request): return super().get_queryset(request).select_related("project") @@ -84,6 +85,7 @@ class RedirectInline(admin.TabularInline): """Redirect inline relationship view for :py:class:`ProjectAdmin`.""" model = Redirect + classes = ["collapse"] class DomainInline(admin.TabularInline):