aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/admin.py b/admin.py
index 2408623..156eef1 100644
--- a/admin.py
+++ b/admin.py
@@ -15,7 +15,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from django.contrib import admin
-from .models import Timetable, LastUpdate, Group, Subscription, Room, Course
+from .models import Timetable, LastUpdate, Group, Subscription, Room, Course, CourseDelta
@admin.register(Timetable)
@@ -54,9 +54,19 @@ class RoomAdmin(admin.ModelAdmin):
@admin.register(Course)
class CourseAdmin(admin.ModelAdmin):
fieldsets = (
- (None, {"fields": ("name", "type", "timetable", "groups", "rooms",)}),
+ (None, {"fields": ("name", "type", "timetable", "groups", "rooms", "active",)}),
("Horaires", {"fields": ("begin", "end",)}),
("Remarques", {"fields": ("notes",)}),)
- list_display = ("name", "type", "timetable", "begin", "end",)
- list_filter = ("type", "timetable__name", "groups",)
+ list_display = ("name", "type", "timetable", "begin", "end", "active",)
+ list_filter = ("type", "timetable__name", "groups", "active",)
ordering = ("begin",)
+
+
+@admin.register(CourseDelta)
+class CourseDeltaAdmin(admin.ModelAdmin):
+ fieldsets = (
+ (None, {"fields": ("course", "update", "operation",)}),
+ )
+ list_display = ("course", "update", "operation",)
+ list_filter = ("operation",)
+ ordering = ("update",)