diff --git a/applications/portal/backend/api/admin.py b/applications/portal/backend/api/admin.py index 9983153e..a90affaf 100644 --- a/applications/portal/backend/api/admin.py +++ b/applications/portal/backend/api/admin.py @@ -99,6 +99,18 @@ class AntibodyFilesAdmin(admin.TabularInline): exclude = ("uploader_uid", 'filehash', 'timestamp', 'display_name') extra = 1 + +# not in fields - catalog_num_search +antibody_fields_shown = ( + "ab_name", "ab_id", "accession", "commercial_type", "catalog_num", "cat_alt", "vendor", + "url","ab_target", "entrez_id", "uniprot_id", "target_species_raw", "subregion", + "modifications", "epitope", "source_organism", "clonality", "clone_id", "product_isotype", + "product_conjugate", "defining_citation", "product_form", "comments", "applications", + "kit_contents", "feedback", "curator_comment", "disc_date", "status", "show_link", + # also in the read-only fields + "uid", "uid_legacy", "insert_time", "lastedit_time", "curate_time", +) + @admin.register(Antibody) class AntibodyAdmin(ImportExportModelAdmin): @@ -111,11 +123,11 @@ class AntibodyAdmin(ImportExportModelAdmin): # list display settings list_filter = ("status",) - list_display = (id_with_ab, "ab_name", "submitter_name", "status", "vendor", "catalog_num", "accession", "insert_time") + list_display = (id_with_ab, "accession", "ab_name", "submitter_name", "status", "vendor", "catalog_num", "insert_time") search_fields = ("ab_id", "ab_name", "catalog_num") - # Edit form settings - exclude= ("catalog_num_search",) + # the following - maintains the order of the fields + fields = antibody_fields_shown inlines = [TargetSpeciesInlineAdmin, AntibodyFilesAdmin]