From 34c64029cb5df822194538f1a775bf73532f47d6 Mon Sep 17 00:00:00 2001 From: Griffin Hosseinzadeh <1976665+griffin-h@users.noreply.github.com> Date: Mon, 17 Aug 2026 17:36:33 -0700 Subject: [PATCH] fix datetime format for Django 5 --- tom_base/formats/__init__.py | 0 tom_base/formats/en/__init__.py | 0 tom_base/formats/en/formats.py | 2 ++ tom_base/settings.py | 6 +----- 4 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 tom_base/formats/__init__.py create mode 100644 tom_base/formats/en/__init__.py create mode 100644 tom_base/formats/en/formats.py diff --git a/tom_base/formats/__init__.py b/tom_base/formats/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tom_base/formats/en/__init__.py b/tom_base/formats/en/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tom_base/formats/en/formats.py b/tom_base/formats/en/formats.py new file mode 100644 index 000000000..9f0966c96 --- /dev/null +++ b/tom_base/formats/en/formats.py @@ -0,0 +1,2 @@ +DATETIME_FORMAT = 'Y-m-d H:i:s' +DATE_FORMAT = 'Y-m-d' diff --git a/tom_base/settings.py b/tom_base/settings.py index f37fe83a7..93c05025f 100644 --- a/tom_base/settings.py +++ b/tom_base/settings.py @@ -121,13 +121,9 @@ USE_I18N = True -USE_L10N = False - USE_TZ = True -DATETIME_FORMAT = 'Y-m-d H:i:s' -DATE_FORMAT = 'Y-m-d' - +FORMAT_MODULE_PATH = 'tom_base.formats' # Caching # https://docs.djangoproject.com/en/dev/topics/cache/#filesystem-caching