aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'admin.py')
-rw-r--r--admin.py21
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",)