diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-27 14:47:12 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-24 18:32:22 +0200 |
| commit | 4f448b6473f843b5480921903afa342ab7f19345 (patch) | |
| tree | f1aa2c7412ebcb08bb53a1f3a88583b50cb967ce /archaeological_warehouse/models.py | |
| parent | 3fa3737646f6238be435e2652506609031f8c984 (diff) | |
| download | Ishtar-4f448b6473f843b5480921903afa342ab7f19345.tar.bz2 Ishtar-4f448b6473f843b5480921903afa342ab7f19345.zip | |
♻️ django: fix warnings for v5 - migrate to timezone aware dates
Diffstat (limited to 'archaeological_warehouse/models.py')
| -rw-r--r-- | archaeological_warehouse/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index e9588668c..2d10fde1d 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -29,6 +29,7 @@ from django.db.models import Q, Max from django.db.models.signals import post_save, post_delete, m2m_changed, pre_delete from django.template.defaultfilters import slugify from django.urls import reverse, reverse_lazy +from django.utils import timezone from ishtar_common.utils import gettext_lazy as _, pgettext_lazy from django.apps import apps @@ -1240,7 +1241,7 @@ class Container( blank=True, null=True, ) - history_date_deprecated = models.DateTimeField(default=datetime.datetime.now) + history_date_deprecated = models.DateTimeField(default=timezone.now) history = HistoricalRecords(bases=[HistoryModel]) DISABLE_POLYGONS = False |
