aboutsummaryrefslogtreecommitdiff
path: root/admin.py
diff options
context:
space:
mode:
authorAlban Gruin2017-01-18 19:13:54 +0100
committerAlban Gruin2017-01-18 19:13:54 +0100
commitf203597c7502a33134854f6f7df336a9347e16f3 (patch)
tree2b35ff029f473401c781f79ec749fa99fc3066e8 /admin.py
Validation initiale
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",)