From 9f22157ccfb911627c06c1801b9e6cdefb497649 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 5 May 2020 13:57:19 +0200 Subject: [PATCH] datetime are time-zoned --- apps/tournament/models.py | 4 ++-- tfjm/urls.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/tournament/models.py b/apps/tournament/models.py index 076df42..2c8095a 100644 --- a/apps/tournament/models.py +++ b/apps/tournament/models.py @@ -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"), ) diff --git a/tfjm/urls.py b/tfjm/urls.py index 1df5615..90c467c 100644 --- a/tfjm/urls.py +++ b/tfjm/urls.py @@ -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