diff options
author | Alban Gruin | 2017-01-18 19:13:54 +0100 |
---|---|---|
committer | Alban Gruin | 2017-01-18 19:13:54 +0100 |
commit | f203597c7502a33134854f6f7df336a9347e16f3 (patch) | |
tree | 2b35ff029f473401c781f79ec749fa99fc3066e8 /admin.py |
Validation initiale
Diffstat (limited to 'admin.py')
-rw-r--r-- | admin.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/admin.py b/admin.py new file mode 100644 index 0000000..99f3398 --- /dev/null +++ b/admin.py @@ -0,0 +1,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",) |