diff options
-rw-r--r-- | admin.py | 2 | ||||
-rw-r--r-- | models.py | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -57,7 +57,7 @@ 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", "last_update",)}), ("Horaires", {"fields": ("begin", "end",)}), ("Remarques", {"fields": ("notes",)}),) list_display = ("name", "type", "timetable", "begin", "end",) @@ -161,6 +161,8 @@ class Course(models.Model): begin = models.DateTimeField(verbose_name="début du cours", db_index=True) end = models.DateTimeField(verbose_name="fin du cours") + last_update = models.DateTimeField(verbose_name="dernière mise à jour") + def __str__(self): return self.name |