konova/codelist/admin.py
mipel 77b290216b Konova Codelist enhancements
* adds proper boolean mapping to update_codelist
* differs between id and atom_id for KonovaCode since atomIds are not unique (could change in the future)
* adds is_selectable and is_archived to KonovaCode
* scales width of DAL form fields to 100% width
* adds table-responsive wrapping container for table forms to prevent unwanted rendering artifacts in case of table resizing due to long content
* adds autocomplete routes for law, registration offices and conservation offices
2021-08-26 12:45:48 +02:00

41 lines
751 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",
"atom_id",
"parent",
"short_name",
"long_name",
"is_leaf",
"is_selectable",
"is_archived",
]
readonly_fields = [
"id",
"short_name",
"long_name",
"is_archived",
"is_selectable",
"is_leaf",
"parent",
]
#admin.site.register(KonovaCodeList, KonovaCodeListAdmin)
admin.site.register(KonovaCode, KonovaCodeAdmin)