diff options
Diffstat (limited to 'ctrack/caf/admin.py')
-rw-r--r-- | ctrack/caf/admin.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/ctrack/caf/admin.py b/ctrack/caf/admin.py index f19e8f4..e633029 100644 --- a/ctrack/caf/admin.py +++ b/ctrack/caf/admin.py @@ -5,24 +5,29 @@ from .models import CAF, FileStore, DocumentFile, Grading, ApplicableSystem class ApplicableSystemListAdmin(admin.ModelAdmin): model = ApplicableSystem - list_display = ["name", "organisation", "caf"] + list_display = ["name", "function"] -class ApplicableSystemAdmin(admin.StackedInline): - model = ApplicableSystem - max_num = 3 - extra = 1 +# FIXME +# class ApplicableSystemAdmin(admin.StackedInline): +# model = ApplicableSystem +# max_num = 3 +# extra = 1 -def get_caf_name(obj): - ass = ApplicableSystem.objects.filter(caf=obj).first() - return f"{ass.organisation.name}_v{obj.version}" +# FIXME - NOT NEEDED +# def get_caf_name(obj): +# ass = ApplicableSystem.objects.filter(caf=obj).first() +# return f"{ass.organisation.name}_v{obj.version}" +# FIXME class CAFAdmin(admin.ModelAdmin): model = CAF - inlines = [ApplicableSystemAdmin] - list_display = [get_caf_name, "quality_grading", "confidence_grading", "file"] + # inlines = [ApplicableSystemAdmin] + + +# list_display = ["quality_grading", "confidence_grading", "file"] admin.site.register(CAF, CAFAdmin) |