Skip to content

Commit 81ed02b

Browse files
committed
Clean up build admin
1 parent 286e602 commit 81ed02b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

readthedocs/builds/admin.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@
33
"""
44

55
from django.contrib import admin
6-
from readthedocs.builds.models import Build, VersionAlias, Version
6+
from readthedocs.builds.models import Build, VersionAlias, Version, BuildCommandResult
77
from guardian.admin import GuardedModelAdmin
88

99

10+
class BuildCommandResultInline(admin.TabularInline):
11+
model = BuildCommandResult
12+
fields = ('command', 'exit_code')
13+
14+
1015
class BuildAdmin(admin.ModelAdmin):
11-
list_display = ('project', 'date', 'success', 'type', 'state')
16+
fields = ('project', 'version', 'type', 'state', 'success', 'length')
17+
list_display = ('project', 'success', 'type', 'state')
18+
raw_id_fields = ('project', 'version')
19+
inlines = (BuildCommandResultInline,)
1220

1321

1422
class VersionAdmin(GuardedModelAdmin):

0 commit comments

Comments
 (0)