1 from django.contrib import admin
2 from .models import Competence, CompetenceLevel, Level, Section
4 class CompetenceLevelInline(admin.TabularInline):
5 model = CompetenceLevel
7 class CompetenceAdmin(admin.ModelAdmin):
9 list_display = ['name', 'section', 'slug', 'order']
10 inlines = [CompetenceLevelInline]
12 class LevelAdmin(admin.ModelAdmin):
14 list_display = ['name', 'slug', 'order']
16 class SectionAdmin(admin.ModelAdmin):
18 list_display = ['name', 'slug', 'order']
21 admin.site.register(Level, LevelAdmin)
22 admin.site.register(Section, SectionAdmin)
23 admin.site.register(Competence, CompetenceAdmin)