aboutsummaryrefslogtreecommitdiff
path: root/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'models.py')
-rw-r--r--models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/models.py b/models.py
index e284c28..b1d6d27 100644
--- a/models.py
+++ b/models.py
@@ -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