datetime are time-zoned

This commit is contained in:
Yohann D'ANELLO 2020-05-05 13:57:19 +02:00
parent f5367828ca
commit 9f22157ccf
2 changed files with 3 additions and 2 deletions

View File

@ -36,12 +36,12 @@ class Tournament(models.Model):
)
date_start = models.DateField(
default=timezone.now().date(),
default=timezone.now,
verbose_name=_("date start"),
)
date_end = models.DateField(
default=timezone.now().date(),
default=timezone.now,
verbose_name=_("date end"),
)

View File

@ -43,6 +43,7 @@ urlpatterns = [
# Supporting old paths
path('inscription/', RedirectView.as_view(pattern_name="member:signup")),
path('connexion/', RedirectView.as_view(pattern_name="login")),
path('tournois/', RedirectView.as_view(pattern_name="tournament:list")),
]
handler400 = bad_request