Check the Django version before using a removed setting

This commit is contained in:
tcely 2025-05-14 10:38:16 -04:00 committed by GitHub
parent aa27e1c22b
commit 6c10a1da5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,3 +1,4 @@
from django import VERSION as DJANGO_VERSION
from pathlib import Path
from common.utils import getenv
@ -99,7 +100,9 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = getenv('TZ', 'UTC')
USE_I18N = True
USE_L10N = True
# Removed in Django 5.0
if DJANGO_VERSION[0:3] < (5, 0, 0):
USE_L10N = True
USE_TZ = True