diff options
author | Alban Gruin | 2017-09-24 17:36:40 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-24 17:36:40 +0200 |
commit | dc5618c3b3af18a5f6e1d50844097c745317125a (patch) | |
tree | 5f42ea7200fb7bc2d0aada47e4df90ae4e9da87f /models.py | |
parent | e30b0c673cae607175c5bae6df6e87d8b100bdf3 (diff) |
Ajout de la date et de l’heure automatiquement lors de la création
d’un cours
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -143,7 +143,7 @@ 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") + last_update = models.DateTimeField(verbose_name="dernière mise à jour", auto_now_add=True) def __str__(self): return self.name |