Skip to content

Commit

Permalink
Admin: Make large inlines collapse by default (#11717)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher authored Nov 5, 2024
1 parent 01ba042 commit 40b8808
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions readthedocs/builds/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
class BuildCommandResultInline(admin.TabularInline):
model = BuildCommandResult
fields = ("command", "exit_code", "output")
classes = ["collapse"]


@admin.register(Build)
Expand Down
2 changes: 2 additions & 0 deletions readthedocs/projects/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -84,6 +85,7 @@ class RedirectInline(admin.TabularInline):
"""Redirect inline relationship view for :py:class:`ProjectAdmin`."""

model = Redirect
classes = ["collapse"]


class DomainInline(admin.TabularInline):
Expand Down

0 comments on commit 40b8808

Please sign in to comment.