diff options
Diffstat (limited to 'models.py')
-rw-r--r-- | models.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -16,6 +16,7 @@ from django.db import models from django.db.models import Count, Manager, Q from django.db.models.functions import ExtractWeek, ExtractYear +from django.utils import timezone from django.utils.text import slugify from .utils import parse_group @@ -143,7 +144,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", auto_now_add=True) + last_update = models.DateTimeField(verbose_name="dernière mise à jour", default=timezone.now) def __str__(self): return self.name |