aboutsummaryrefslogtreecommitdiff
path: root/admin.py
blob: 99f33981bc4ea17eea040b1539478cdd44ec7ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from django.contrib import admin
from edt.models import Group, Room, Course


@admin.register(Group)
class GroupAdmin(admin.ModelAdmin):
    pass


@admin.register(Room)
class RoomAdmin(admin.ModelAdmin):
    pass


@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
    fieldsets = (
        (None, {"fields": ("name", "type", "groups", "rooms",)}),
        ("Horaires", {"fields": ("begin", "end",)}),)
    list_display = ("name", "type", "begin", "end",)
    list_filter = ("type", "groups",)