From eda40f3481b6963163a04cc393db2bb95d3c5242 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 27 Mar 2025 14:47:12 +0100 Subject: ♻️ django: fix warnings for v5 - migrate to timezone aware dates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/wizards.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 8d58b4146..d29ebf365 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -47,6 +47,7 @@ from django.http import HttpResponseRedirect, Http404 from django.forms import ValidationError from django.shortcuts import redirect, render, reverse from django.template import loader +from django.utils import timezone from django.utils.translation import gettext_lazy as _ from django.utils.safestring import mark_safe @@ -2117,7 +2118,7 @@ class AccountWizard(Wizard): account.username = dct["username"] account.email = dct["email"] except ObjectDoesNotExist: - now = datetime.datetime.now() + now = timezone.now() account = models.User.objects.create( username=dct["username"], email=dct["email"], -- cgit v1.2.3