blob: b0f1218c138455b911298841cffa78ce3520e66a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
from django.contrib import admin
from .models import CAF, CAFFileStore, DocumentFile, Grading, EssentialService
class EssentialServiceListAdmin(admin.ModelAdmin):
model = EssentialService
list_display = ["name", "organisation", "caf"]
class EssentialServiceAdmin(admin.StackedInline):
model = EssentialService
max_num = 3
extra = 1
class CAFAdmin(admin.ModelAdmin):
model = CAF
inlines = [EssentialServiceAdmin]
list_display = ["owner", "triage_grading", "confidence_grading", "file"]
admin.site.register(CAF, CAFAdmin)
admin.site.register(CAFFileStore)
admin.site.register(DocumentFile)
admin.site.register(Grading)
admin.site.register(EssentialService, EssentialServiceListAdmin)
|