diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-27 14:47:12 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-06-13 18:08:06 +0200 |
commit | 84ed3cfb40a64e64ddc32cc0df943cb12e198717 (patch) | |
tree | d4220a3a19ee6ae31fbf281d7e0d35fb5b452cd1 /archaeological_finds/models_treatments.py | |
parent | db174e7f376a3687cb6cd84339592231ceae0ee0 (diff) | |
download | Ishtar-84ed3cfb40a64e64ddc32cc0df943cb12e198717.tar.bz2 Ishtar-84ed3cfb40a64e64ddc32cc0df943cb12e198717.zip |
♻️ django: fix warnings for v5 - migrate to timezone aware dates
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r-- | archaeological_finds/models_treatments.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py index b7b33fcfc..9d8e38bd2 100644 --- a/archaeological_finds/models_treatments.py +++ b/archaeological_finds/models_treatments.py @@ -31,8 +31,9 @@ from django.contrib.postgres.indexes import GinIndex from django.db.models import Max, Q from django.db.models.signals import post_save, post_delete, pre_delete, m2m_changed from django.template.defaultfilters import slugify +from django.utils import timezone from django.urls import reverse -from ishtar_common.utils import gettext_lazy as _, pgettext_lazy, SheetItem +from ishtar_common.utils import gettext_lazy as _, pgettext_lazy from archaeological_finds.models_finds import Find, FindBasket, TreatmentType, \ FindTreatment @@ -56,7 +57,6 @@ from ishtar_common.models import ( Person, post_save_cache, SearchVectorConfig, - ShortMenuItem, ValueGetter, ) from ishtar_common.models_common import CompleteIdentifierItem, HistoricalRecords @@ -421,7 +421,7 @@ class Treatment( goal = models.TextField(_("Goal"), blank=True, default="") start_date = models.DateField(_("Start date"), blank=True, null=True) end_date = models.DateField(_("End date"), blank=True, null=True) - creation_date = models.DateTimeField(default=datetime.datetime.now) + creation_date = models.DateTimeField(default=timezone.now) container = models.ForeignKey( Container, verbose_name=_("Container"), |