konova/codelist/admin.py
mipel 49f7f3db53 Codelist integration
* adds codelist app
* adds KonovaCodeList and KonovaCode model for fetching and storing OSIRIS Codelisten entries
* adds update_codelist command for updating and fetching codes
* adds autocomplete route for using codelists in forms
2021-08-23 18:30:02 +02:00

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)