37 lines
657 B
Python
37 lines
657 B
Python
|
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",
|
||
|
"parent",
|
||
|
"short_name",
|
||
|
"long_name",
|
||
|
"is_leaf",
|
||
|
"is_active",
|
||
|
]
|
||
|
|
||
|
readonly_fields = [
|
||
|
"id",
|
||
|
"short_name",
|
||
|
"long_name",
|
||
|
"is_leaf",
|
||
|
"parent",
|
||
|
]
|
||
|
|
||
|
|
||
|
#admin.site.register(KonovaCodeList, KonovaCodeListAdmin)
|
||
|
admin.site.register(KonovaCode, KonovaCodeAdmin)
|