aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/admin.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ctrack/caf/admin.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/ctrack/caf/admin.py b/ctrack/caf/admin.py
index e423044..139b013 100644
--- a/ctrack/caf/admin.py
+++ b/ctrack/caf/admin.py
@@ -1,8 +1,30 @@
from django.contrib import admin
from .models import CAF, CAFFileStore, DocumentFile, Ranking
+from .models import ConfidenceAssessment
+from .models import EssentialService
-admin.site.register(CAF)
+
+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_ranking", "confidence_assessment", "file"]
+
+
+admin.site.register(CAF, CAFAdmin)
admin.site.register(CAFFileStore)
admin.site.register(DocumentFile)
admin.site.register(Ranking)
+admin.site.register(ConfidenceAssessment)
+admin.site.register(EssentialService, EssentialServiceListAdmin)