2021-08-23 18:30:02 +02:00
|
|
|
from django.contrib import admin
|
|
|
|
|
|
|
|
from codelist.models import KonovaCode, KonovaCodeList
|
|
|
|
|
|
|
|
|
|
|
|
class KonovaCodeListAdmin(admin.ModelAdmin):
|
|
|
|
list_display = [
|
|
|
|
"id",
|
|
|
|
]
|
|
|
|
readonly_fields = [
|
|
|
|
"id",
|
|
|
|
"codes",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
class KonovaCodeAdmin(admin.ModelAdmin):
|
|
|
|
list_display = [
|
|
|
|
"id",
|
2021-08-26 12:45:48 +02:00
|
|
|
"atom_id",
|
2021-08-23 18:30:02 +02:00
|
|
|
"parent",
|
|
|
|
"short_name",
|
|
|
|
"long_name",
|
|
|
|
"is_leaf",
|
2021-08-26 12:45:48 +02:00
|
|
|
"is_selectable",
|
|
|
|
"is_archived",
|
2021-08-23 18:30:02 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
readonly_fields = [
|
|
|
|
"id",
|
|
|
|
"short_name",
|
|
|
|
"long_name",
|
2021-08-26 12:45:48 +02:00
|
|
|
"is_archived",
|
|
|
|
"is_selectable",
|
2021-08-23 18:30:02 +02:00
|
|
|
"is_leaf",
|
|
|
|
"parent",
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
#admin.site.register(KonovaCodeList, KonovaCodeListAdmin)
|
|
|
|
admin.site.register(KonovaCode, KonovaCodeAdmin)
|