cute rotating carousel
[edumed.git] / curriculum / admin.py
1 from django.contrib import admin
2 from .models import Competence, CompetenceLevel, Level, Section
3
4 class CompetenceLevelInline(admin.TabularInline):
5     model = CompetenceLevel
6
7 class CompetenceAdmin(admin.ModelAdmin):
8     model = Competence
9     list_display = ['name', 'section', 'slug', 'order']
10     inlines = [CompetenceLevelInline]
11
12 class LevelAdmin(admin.ModelAdmin):
13     model = Level
14     list_display = ['name', 'slug', 'order']
15
16 class SectionAdmin(admin.ModelAdmin):
17     model = Section
18     list_display = ['name', 'slug', 'order']
19
20
21 admin.site.register(Level, LevelAdmin)
22 admin.site.register(Section, SectionAdmin)
23 admin.site.register(Competence, CompetenceAdmin)