1 from django.contrib import admin
2 from .models import (Competence, CompetenceLevel, Level, Section,
3 CurriculumCourse, CurriculumLevel, Curriculum)
5 class CompetenceLevelInline(admin.TabularInline):
6 model = CompetenceLevel
8 class CompetenceAdmin(admin.ModelAdmin):
10 list_display = ['name_pl', 'name_en', 'section', 'slug', 'order']
11 inlines = [CompetenceLevelInline]
13 class LevelAdmin(admin.ModelAdmin):
15 list_display = ['name_pl', 'name_en', 'group_pl', 'group_en', 'slug', 'order']
17 class SectionAdmin(admin.ModelAdmin):
19 list_display = ['name_pl', 'name_en', 'slug', 'order']
22 admin.site.register(Level, LevelAdmin)
23 admin.site.register(Section, SectionAdmin)
24 admin.site.register(Competence, CompetenceAdmin)
26 admin.site.register(CurriculumCourse)
27 admin.site.register(CurriculumLevel)
28 admin.site.register(Curriculum)