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