aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
authorAlban Gruin2017-09-24 17:36:40 +0200
committerAlban Gruin2017-09-24 17:36:40 +0200
commitdc5618c3b3af18a5f6e1d50844097c745317125a (patch)
tree5f42ea7200fb7bc2d0aada47e4df90ae4e9da87f /models.py
parente30b0c673cae607175c5bae6df6e87d8b100bdf3 (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.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/models.py b/models.py
index 5128c8a..e284c28 100644
--- a/models.py
+++ b/models.py
@@ -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