diff options
-rw-r--r-- | admin.py | 3 | ||||
-rw-r--r-- | models.py | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -54,12 +54,13 @@ class RoomAdmin(admin.ModelAdmin): @admin.register(Course) class CourseAdmin(admin.ModelAdmin): fieldsets = ( - (None, {"fields": ("name", "type", "timetable", "groups", "rooms", "active",)}), + (None, {"fields": ("name", "type", "timetable", "groups", "rooms", "active", "celcat_id",)}), ("Horaires", {"fields": ("begin", "end",)}), ("Remarques", {"fields": ("notes",)}),) list_display = ("name", "type", "timetable", "begin", "end", "active",) list_filter = ("type", "timetable__name", "groups", "active",) ordering = ("begin",) + readonly_fields = ("celcat_id",) @admin.register(CourseDelta) @@ -160,6 +160,8 @@ class Course(models.Model): active = models.BooleanField(verbose_name="actif", default=True) checked = models.BooleanField(default=True, db_index=True) + celcat_id = models.IntegerField(verbose_name="ID dans Celcat") + def __str__(self): return self.name |