4e83537db224a14b701e4fc7634126e541264db1
[edumed.git] / curriculum / admin.py
1 from django.contrib import admin
2 from .models import (Competence, CompetenceLevel, Level, Section,
3     CurriculumCourse, CurriculumLevel, Curriculum)
4
5 class CompetenceLevelInline(admin.TabularInline):
6     model = CompetenceLevel
7
8 class CompetenceAdmin(admin.ModelAdmin):
9     model = Competence
10     list_display = ['name_pl', 'name_en', 'section', 'slug', 'order']
11     inlines = [CompetenceLevelInline]
12
13 class LevelAdmin(admin.ModelAdmin):
14     model = Level
15     list_display = ['name_pl', 'name_en', 'group_pl', 'group_en', 'slug', 'order']
16
17 class SectionAdmin(admin.ModelAdmin):
18     model = Section
19     list_display = ['name_pl', 'name_en', 'slug', 'order']
20
21
22 admin.site.register(Level, LevelAdmin)
23 admin.site.register(Section, SectionAdmin)
24 admin.site.register(Competence, CompetenceAdmin)
25
26 admin.site.register(CurriculumCourse)
27 admin.site.register(CurriculumLevel)
28 admin.site.register(Curriculum)